Previous Topic

Next Topic

Option Print statement

Allows control over what happens after every print statement and how strings are delimited.

When a string is printed you may have an optional delimiting character printed on each side of the string. If the last delimexpression evaluated as a non empty string, that string will be written before and after the string value being printed. This provides for a simple method of creating delimited string output for use in exporting. If no delimexpression is provided then no delimiting is used.

Syntax

Option Print [sepexpression, delimexpression]

Example

Usage

Option Print ","

Will separate each item printed by a comma, thus generating simple comma separated value format output.

Option Print Chr(9)

Will generate tab separated output.

Option Print

With no expression, this will provide no separators and it is the programmer's responsibility to generate output needed.

Option Print Chr(13)

Will separate items with a carriage return character.

Option Print ",", Chr(34)

Will output printed values in CSV format. All values are separated by a comma and strings delimited by a double quote (") character.

See Also

MaxBasic Statements

Book Contents

Book Index