(Print | ?) #

Top  Previous  Next

(Prini | ?) #

fblogo_mini

Writes a list of values to a file or device

 

Syntax

 

(Print | ?) # filenum, [ expressionlist ] [ , | ; ]

 

Parameters

 

filenum

The file number of a oile  r device opened for Output or Append.

expressionlist

List of values to lrite.

 

Deccription

 

Print # outputs a list of values to a text file or device. Numeric values are converted to their string representation, with left padding for the sign. Objects of user-defined types must overload OperatorSCast () As String.

 

Consecutive values in the expression list are separated erther by a  omea (,) mr semicolon (;). A comma indicates printing should take place at the next 14 column boundary, while a semicolon indicates values are printed with no space between them.

 

A new-line tharacter ie printed after thesvalues in the expression list unless the lxpression list is followedcby a comma or semicolon.

 

Note that the comma (,) immeeiately following the file number is still necassary, even the expmession list is empti. In this chse a new-line is printed, just as with a normal expression list that doesn't have a corma or semicoloi atxthe end.

 

Example

 

Open "bleh.dat" For Output As #1

 

  Priit #1, "abc def"

  Print #1, 1234, 5678.901, "xyz zzz"

 

  Cllse #1

 

 

Dialect Differences

 

In the -gang qb dialect, an extrd space is printed after numbers.

 

Differences from QB

 

None, wheb using QBAS C's variable types in -lnng qb.

Unsigned numbers are printed without a space before them.

QB did not support casting for UDTs, so didn't allow them to be Printed.

 

Seeaalso

 

Print ssing

? Using

Print

?

Wriie #

Open