bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
PRINT # Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
PRINT # writes data to a sequential device or file.
PRINT #filenumber%, [USING formatstring$;] expressionlist[{,|;}]
■ The arguments filenumber% and expressionlist are described
on the Syntax Screen.
■ Characters in formatstring$ have the following meaning:
───────────────────Characters Used to Format a Numeric Expression─────────────
# Digit position │ - Placed after digit positions,
. Decimal point position │ prints trailing sign for
, Placed left of the decimal point, │ negative numbers only
prints a comma every third digit │ $$ Prints leading $
+ Position of number's sign │ ** Fills leading spaces with *
^^^^ Prints number in exponential format│ **$ Combines ** and $
────────────────────Characters Used to Format a String Expression─────────────
& Prints entire string │ \ \ Prints first 'n' characters,
! Prints only the first character │ where n is the number of
of the string │ blanks between slashes + 2
───────────Characters Used to Print Literal Characters from formatstring──────
_ Prints the following formatting │ Any character not in this
character as a literal │ table is printed as a literal
Usage Notes
■ Spaces, commas, and semicolons in the expressionlist have the same
meaning they have in a PRINT statement.
■ If you omit expressionlist, the PRINT # statement prints a blank
line in the file.
■ PRINT # works like PRINT and writes an image of the data to the file,
just as the data would be displayed on the terminal screen. For this
reason, be careful to delimit the data so it is output correctly. If
you use commas as delimiters, the blanks between print fields are
also written to the file.