The "?" is a shortcut for a CR/LF sequence, which is usually at the end of a line. Coders that are used to BASIC sometimes think of it as a PRINT statement, since "?" is a BASIC shortcut for PRINT. As such, it winds up at the beginning of the line.

Running Kix32 /f will flush the cache without needing a reboot, but the data is already cached for that sesssion. There are ways to manually flush the cache by deleting a registry key.

The SANITY UDF will scan your code and look for common errors in syntax, including mismatches of quotes, parens, and paired expressions like If/EndIf. Get the copy from my web site as it was updated recently and the copy here is over a year old.

A simple way to write a debug log is to use one of the message UDFs. I just posted fMsg() today. Define a global var called $MSG_LOG_ to point to the log file, then add
 Code:
$MsgTxt = 'this is a message... the error was' + @ERROR
fMsg($MsgTxt, , 0, 16)
This will write the message only to the log file. You can even do something fancy:
 Code:
$MsgTxt = 'An error occurred while mapping drive D:'
$LogTxt = 'Drive D:, \\server\share, ' + @SERROR
$fMsg($MsgTxt, $LogTxt)
which will write a short message to the screen and a more detailed message to the log.

Be sure to Del $Msg_Log_ after you define it, otherwise it will keep gathering data from each login session into a single file.

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