ChaosPro’s internal programming language supports seven primitive types.
Six scalar types:
- real (double,float)
One compound type:
And finally a special type to mention, which is NOT supported:
Just like in almost all other programming languages variables first have to be declared before they can be used. On declaring a variable you must specify the variable type.
Type conversions are done automatically from ChaosPro. Because there’s no string datatype many misleading situations simply cannot occur. There is no cast operator like in other programming languages.
Type conversions are done canonically, i.e. they do what you would do…:
real a; complex b; b=(3,4); a=b; // a will contain 3, i.e. real part of complex number b b=a; // b will contain 3, i.e. the imaginary part of the complex number b will be set to 0