Treating Variables as Strings

You can treat any variable as a string... that means these things are all allowed:

say (ego, myVariable);

newVariable = "The name of the ego character is \"" + ego + "\".";

statusText (57219);

Here's what you'll get when using each of the data types as a string.


Always equates to "undefined".


Equates to the decimal representing the number, as you'd expect, complete with minus sign if required.


Equates to the current value of the string. Oddly.

File handles:

If the game has been compiled in development mode, equates to the original name of the resource file. Otherwise, equates to "file handle".

Object types:

Equates to the on-screen name of the object type.


Equates to the string representation of each element, separated by a comma and a space. If the stack is empty, equates to "empty stack".

Function handles:

Equates to "pointer to function" if the function is user-defined or "pointer to BIF" if the pointer is built-in (ie. one of the functions in the Alphabetical List of Built-in Functions section).


Aliays equates to "animation".


Always equates to "costume".

See also:

Variable Operations

Spellchecking the Strings in your Game