Data Types

From Pointui

Pointui C Script is fundamentally a typed language, but has support for operators which allow loosely typed expressions to be used in some cases. A few basic data types are supported, and generally speaking you need to provide methods with the data type they specify, otherwise they will not do anything. Some data types have operators implemented that allow for automatic conversion between specific data types. For instance, the following example is legitimate:

int i;
String s;
i = 1234;
s = i;

In this example the integer value of 1234 will be automatically converted to a string with characters “1234”.

It is best to think of the script code as being typed - if you need to store an integer, then don’t put it in a string just for the sake of it – use an int. Oftentimes if it makes sense to convert from one data type to another there is usually an operator overload specified on that class that allows it, and for more advanced cases there are methods such as ToString(). Also, some parameters for class methods allow a variety of data types for the same parameter and will do different things depending on what sort of object you supply, and in each of these cases they are documented on the method.

Available data types