PRINT PrintNote that when the cursor is to go to a new line, there is a Print code at the end of the translation, otherwise it is absent. The Print code at run-time preforms the new line action, so in it's absence, the cursor remains on the same line. The PrintDbl, PrintInt, PrintStr and PrintTmpStr will output the value that is on top of the evaluation stack, with PrintTmpStr deleting the temporary string when done.
PRINT A;B% A PrintDbl B PrintInt Print
PRINT A$+B$,C$; A$ B$ + PrintTmpStr Comma C$ PrintStr
PRINT TAB(A+1);"Hello" A 1 + Tab "Hello" PrintStr Print
PRINT "Start";SPC(10) "Start" PrintStr 10 Spc
PRINT ,,A Comma Comma A PrintDbl Print
PRINT ; Semicolon
At run-time, the Comma code will advance the cursor to the next column by outputting spaces. The Tab and Spc codes perform there action by outputting spaces. The Semicolon code does not perform any action during run-time, it is there only so that it can't reproduced during recreation of the source. Next, how the PRINT statement will be translated...
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)