There are six basic "primitive" types in CSS: Int, Real,
char, String, bool, and enum. An Int
is essentially an int, a Real is essentially a
double, and a String is a C++, dynamically-allocating
string object. A char is just an int object that will convert
into its equivalen ASCII character instead of its numerical value when
converted into a String. A bool has two values: true and
false. An enum has defined enumeration values, and will
convert a string representation of one of those values into the
corresponding symbolic/numeric value.
All of the other flavors of int in C, including short,
long, unsigned, etc, are all just defined to be the same
as an Int. Similarly, a float and double are
defined to be the same as a Real. The String object is
the same as the one that comes with the GNU libg++ library (slightly
modified), which provides all of the common string manipulation
functions as member functions of the String object, and handles
the allocation of memory for the string dynamically, etc.
In addition to the primitive types, there are reference, pointer, and
array types. Also, there are both script-defined and TypeAccess-derived
hard-coded class objects. Finally, there are types that point to
hard-coded members of class objects, which correspond to all of the
basic C types, and, unlike the basic script types, are sensitive to the
actual size of a short vs a long, etc.
Finally there is a special SubShell type, which allows one to
have multiple compile spaces (cssProgSpace's) within css. Thus, one
could load one program into the current shell, and use a SubShell
to load another one without getting rid of the first. The two shells
can communicate via extern objects, and they share the same type
space. Typical usage is:
css> extern SubShell sub_shell; css> chsh sub_shell
The first line defines the object (extern is recommended else it
will be removed when the parent shell is recompiled), and the second
switches to it. To exit from the sub shell, just use exit or
ctrl-D (and have faith that when you answer 'y' you will be
returned to the parent shell).