Data Types
From ZDoom Wiki
ACS supports various types of data that you can use. Of these, most are handled as hacks. In reality ACS only supports one data type and that is the integer type.
Integer
The integer data type is your basic data type. An integer is any whole number and can be negative, positive or zero. In ACS all integer types are 4 bytes long so the max and min values for an integer is 2,147,483,647 and -2,147,483,648. To declare a variable to hold this type you use the 'int' keyword.
Boolean
ACS has a hacked support for the boolean data type. This data type can hold either a true or false value or a 1 or 0 value. In ACS you use the 'bool' keyword to declare a boolean variable. Even though you use a different name it is the same thing as a integer and has all the same properties.
//This is legal bool bTest = 7;
Character
Support for character data type is virtually the same as c/c++ except that you have to use the integer type. When assigning characters to a variable you have to enclose them in single quotes and would look like this example:
//This assigns a variable to the letter a int Test = 'a';
Enclosing a character in double quotes atuomattically adds the null terminating character, '\0'. You can also use the special characters like: '\\', '\n' and '\t'.
String
In ACS you can define string literals which look like this:
//this is a string literal "OMG its a string"
When the compiler sees this what it does is add the string to its string table and then assigns an index number to it. The string variable, declared using the 'str' keyword, does not hold the string, but rather, the index to string table. In other words the string variable is the same as the integer and has all its properties. The only way that ACS can tell that it is a string is when used by special functions that expect a string.
//This function actually gets passed this strings index in the string table
//but the function knows to take this number and use it to look up the string table
CheckInventory("Fist");
This is another example on how strings are handled:
//Here we try to add two strings together str Test = "omg its a " + "string!"; print(s:Test); //This prints "string!" and NOT "omg its a string!" //what really happened was this Test = 0 + 1; //so you see that the index is what is being stored
Fixed point
ACS has a very basic support for fixed point types. What happens is you have to assign them to integer types. The decimal value is set to the upper 2 bits of the integer and the integral value is set to the lower two bits. To see this in action we have this example:
//This assigns 1.0 to an integer int Test = 1.0; //The actual value is 65536

