Output commands: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 53: | Line 53: | ||
* Functions like the apostrophe command. | * Functions like the apostrophe command. | ||
* Never appends a carriage return. | * Never appends a carriage return. | ||
|- | |||
| )) <expression> | |||
| Clear formatted output buffer (@0) and add expression | |||
|- | |||
| ) <expression> | |||
| Append to formatted output buffer (@0) an expression | |||
|} | |} | ||
Latest revision as of 02:20, 28 July 2026
Programming Features - Output Commands
The Color 64 output commands differ from the standard BASIC PRINT statement. These commands send output both to the local screen and to the remote user. A regular PRINT statement only displays text on the Sysop’s screen when a caller is online.
Additionally, the Color 64 output commands automatically convert output to ASCII or ANSI when the remote user is operating in those text modes.
Important Note on Logging
When output must also be recorded in the caller log, you must use the format:
A$=<text>:#
If you do not assign the text to A$ first, incorrect information may be written to the caller log because these output commands do not modify A$.
This caution applies to any situation where printed data is later reused elsewhere in the program.
Control-Y Command in Quotes
A special control character, CTRL/Y, has been added to the output routines. It functions like a carriage return but may be embedded directly inside quoted text.
In BASIC, CTRL/Y can be typed within quotation marks. On the BBS, it may be entered without terminating the current input line.
Key characteristics:
- Behaves like a carriage return.
- Can be recorded within text.
- Does not cancel the velocity MCI command (£v), allowing long formatted output without interruption.
Restrictions:
- CTRL/Y cannot replace CR$ when writing structured data to disk (such as message headers or system parameter files).
- It should only be used when output is intended strictly for screen display and not later read by BASIC’s INPUT routine.
- BASIC’s INPUT command does not recognize CTRL/Y as a valid end-of-line character.
An exception exists when CTRL/Y is intended to be stored as part of the data itself. In that case, it must still be followed by a standard carriage return.
See the customizable message headers section for an example of proper usage.
Next Section: The Enhanced If/Then Statement


