Hey Gargoyle!

When you're presenting an example on "?" or "@CRLF", it's best to actually include at least ONE of those in your example!

OK - back to the regularly scheduled example:
 Code:
For $ = 1 to 100
  cls
  "this is line " $ ?     ; Can use "?" or "@CRLF" here interchangably
  sleep 0.25
Next

That will print 100 lines - here's another common way NOT to use @CRLF to display 100 pieces of info, but only one line.
 Code:
For $ = 1 to 100
  cls
  "this is line " $ "     " Chr(13)
  sleep 0.25
Next
@CRLF

Note that there are some blank spaces printed after the "$" value. In this simple example, it insures that a large number followed by a small one will be displayed correctly (think about displaying 100 Random numbers, rather than sequential). When displaying random status lines in this manner, you might display 79 blanks, a Chr(13), and then your message and another Chr(13). A final @CRLF at the end insures that any following text begins on its own line.

Gargoyle brings up some excellent points (even without the ?). I, too, place output throughout my code to aid in debugging. I have a MSG() library that includes a DBG UDF. It outputs only if a global $DEBUG var is true, and writes to a log if a global $LOG_FILE_ var is defined, otherwise outputs to the screen. I often can control the value of $DEBUG in several ways - $DEBUG=1 on the command, via a --D:1 arg on the command line that the script interprets, reading a config file, finding a DEBUG.TXT file in the working folder, or if certain errors occur.

My comment about "?" placement is based on the following logic:
It is a "shortcut" for @CRLF. This sequence traditionally comes at the end of a line of text, which is why it's known as a "line termination sequence". If you place it first, it outputs your text AFTER moving to a new line, leaving your cursor where the text ends. Any following messages that you OR THE SYSTEM output will be placed there instead of at the beginning of a line. This can make it difficult to spot errors in some situations.

The confusion comes about because certain versions of BASIC, going back as far as I can remember (and digging out my old BYTE magazines from the 1970's), used the "?" character as a shortcut for the PRINT statement. This was the first character, followed by the text to be output, followed by an optional semicolon to suppress the CRLF.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D