Les
(KiX Master)
2002-04-03 02:18 AM
Why does the console display zeros and ones (amongst others)?

The likely answer is that they are the return codes from functions.  All KiX functions return something.  If you don't believe me RTFM.

If you took a moment to Read The Fine Manual, you would know this is not entirely true.  AT(), BOX(), and SRND() return nothing.  You would have however, seen some very fine examples of how the return codes are handled.

Examples:
$ReturnCode = AddKey("HKEY_CURRENT_USER\EZReg")

$RC=BackupEventLog("Application","C:\eventbackups\application.evt")

IF Close(3)
  Beep
  ? "Error closing file!"
ENDIF

There is no NUL that you can send the return codes to.  Simply choose a variable, call it $RC, $NUL, $_, or whatever, and use it over and over.  A word of caution however, on using just $.  $ can in and of itself be a variable, but it is not considered good practice to use it.

Take the following example:

break on
$="test"
$ ?
"\\Server\Users\@UserID$" ?
"\\Server\Users\@UserID$$" ?
get $_

If you assign a string or value to $, and then use sloppy coding for say, hidden shares, it will give you grief.  Assigned as a string,

Use "H:" "\\Server\Users\@UserID$"

would concatenate the @UserID and the $ as if it were:

"\\Server\Users\" + @UserID + $

The manual states that if a $ is used within quotes that it should be $$, as in:

Use "H:" "\\Server\Users\@UserID$$"

Check out Ruud's comment on the use of $ in a thread over at ScriptLogic.
intended behavior? "$=" creates a variable