The use of the "?" is somewhat mysterious to new KiX Scripters, especially those used to its reference as a shortcut to the Print statement in various dialects of BASIC.
In KiX, the "?" is actually more like a shortcut to the @CRLF macro - it moves the current output devices to the beginning of a new line.
Anything placed on a line that is not an evaluated expression is simply output - a variable, a quoted string, etc.. they all continue to be displaye on the SAME line until a "?" or @CRLF is encountered. Depending on the state of the WrapAtEOL setting, the output line may wrap at the end of the screen.
Thus, in a loop, a simple status indication can be done by:
Code:
Right(' ' + $Counter, 6) +Chr(13)
This prints the counter value, right justified in a 6 char field as a loop is processed. Since there's no "?" or @CRLF, the Chr(13) returns to the beginning of the same line, overprinting the line counter. You'll need a "?" at the end of the loop if you don't want to overprint the final counter value with the next output line.
You'll also see " ? ? " sometimes, or even " ? 'output' ? " to skip 2 lines, or a line before and after the output.
Hope this demystifies the "?"
Glenn
_________________________
Actually I
am a Rocket Scientist!