Show/Hide Toolbars

XSharp

The SYMBOL type is a 32-bit integer that represents an index into an array of strings.

 

Since a SYMBOL represents a string, there is a built-in implicit conversion from SYMBOL to STRING, and from STRING to SYMBOL.

 

Since the underlying value of a SYMBOL is an integer, there is a built-in explicit conversion from SYMBOL to DWORD and from DWORD to SYMBOL. A cast is necessary in order to perform explicit conversions.

 

Unlike with Visual Objects, the number of symbols is not limited by available memory or symbols that are declared in another library.
 

Literal symbols consist of the '#' character followed by one or more alphanumeric characters. The first character must be a letter or an underscore.

 

Some examples of literal symbols are shown below:

#XSharp
#XSHARP

 

Note that although literal symbols can be specified with lower or upper case letters, the strings they represent are converted to uppercase at compile time, for compatibility with Visual Objects. It is not possible to specify a literal symbol that contains lower case letters; the StringToAtom() function must be used.

 

The compiler-defined constant NULL_SYMBOL can be used to express a null symbol, i.e. a symbol that has no associated string value.

Implementation

The SYMBOL type is implemented in the structure XSharp.__Symbol.

The Usual type of SYMBOL  is 10.