
Note: You must add uk to the end of the address, it's to help prevent spam. |
PRINT TYPE: Statement Action: The PRINT statement is normally used to write data items to the screen. However, the CMD statement may be used to re-direct that output to any other device in the system. The <variable(s)> in the output-list are expressions of any type. If no output-list is present, a blank line is printed. The position of each printed item is determined by the punctuation used to separate items in the output-list. The punctuation characters that you can use are blanks, commas, or semicolons. The 80-character logical screen line is divided into 8 print zones of 10 spaces each. In the list of expressions, a comma causes the next value to be printed at the beginning of the next zone. A semicolon causes the next value to be printed immediately following the previous value. However, there are two exceptions to this rule:
When you use blanks or no punctuation between string constants or variable names it has the same effect as a semicolon. However, blanks between a string and a numeric item or between two numeric items will stop output without printing the second item. If a comma or a semicolon is at the end of the output-list, the next PRINT statement begins printing on the same line, and spaced accordingly. If no punctuation finishes the list, a carriage-return and a line-feed are printed at the end of the data. The next PRINT statement will begin on the next line. If your output is directed to the screen and the data printed is longer than 40 columns, the output is continued on the next screen line. There is no statement in BASIC with more variety than the PRINT statement. There are so many symbols, functions, and parameters associated with this statement that it might almost be considered as a language of its own within BASIC; a language specially designed for writing on the screen. EXAMPLES of PRINT Statement:
Quote Mode Once the quote mark <SHIFT+2> is typed, the cursor controls stop operating and start displaying reversed characters which actually stand for the cursor control you are hitting. This allows you to program these cursor controls, because once the text inside the quotes is PRINTed they perform their functions. The <INST/DEL> key is the only cursor control not affected by "quote mode." 1. Cursor Movement
If you wanted the word HELLO to PRINT diagonally from the upper
left corner of the screen, you would type: 2. Reverse Characters 3. Color Controls
If you wanted to PRINT the word HELLO in cyan
and the word THERE in white, type: 4. Insert Mode Because of this, it is possible to create a PRINT statement containing DELetes, which cannot be PRINTed in quote mode. Here is an example of how this is done:
When the above line is RUN, the word displayed will be HELP, because the last two letters are deleted and the P is put in their place. WARNING: The DELetes will work when LISTing as well as PRINTing, so editing a line with these characters will be difficult. The "insert mode" condition is ended when the <RETURN> (or <SHIFT+RETURN>) key is hit, or when as many characters have been typed as spaces were inserted. 5. Other Special Characters
The <SHIFT+RETURN> will work in the LISTing as well as PRINTing, so editing will be almost impossible if this character is used. The LISTing will also look very strange. |