Hello list,
I'm a newbe programmer in MapBasic. I've many years of Pascal under my belt
though. I thought that I'd mention that so that my questions can have a
little context.
The following is a 'copy' from the MapBasic v3.0 help file:
Print # statement
Purpose
Writes data to a file opened in a Sequential mode (Output or
Append).
Syntax
Print # file_num [ , expr ]
file_num is the number of a file opened through the Open File
statement
expr is an expression to write to the file
Description
The Print # statement writes data to an open file. The file must be
open, in a sequential
mode which allows output (Output or Append).
The file_num parameter corresponds to the number specified in the As
clause of the
Open File statement.
MapInfo writes the expression expr to a line of the file. To store a
comma-separated list
of expressions in each line of the file, use Write # instead of
Print #.
See Also
File input/output
My first question is: Does this syntax force me to output just one and only
one expr with each print statement? Am I forced to concatenate several
expressions into just a single one for them to be acceptable to the print
statement? Qbasic permits an expression list on its print statement, each
expression being separated from any adjoining ones by commas. Does MapBasic
force its user to concatenate individual expressions into one long one by
converting each individual one to a string and then using the + symbol to
jam them together as a single long string?
My second question is: Does the Print statement always output (a) line
terminator character(s)? Qbasic permits its user to avoid putting the CR/LF
pair at the end of a line by virtue of the user finishing the Print
statement with a ; semicolon character. Does MapBasic not have that
(simple) feature? If not, how can I append output to a single line? Am I
really forced to build a string bit by bit and then output it in its
entirety at just one single location in my code?
Thanks in advance.
PS Thanks to Warren Vick of Europa Tech. for his generosity.
Stuart Cox
Map Generalization Technician, not
Resources Inventory Branch
······················································
Phone: (250)387-5529
FAX: (250)356-9430
email [EMAIL PROTECTED]
Check out the RIB Website at:
http://www.for.gov.bc.ca/resinv/homepage.htm
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.