-
Notifications
You must be signed in to change notification settings - Fork 2
Basic Types
mystborn edited this page Feb 28, 2018
·
4 revisions
In TaffyScript, there are very few built in types. The ones that exist are as follows:
- Number (float)
- String
- 1-Dimensional Array
- 2-Dimensional Array
Number constants can be any numerical value with or without a decimal point (i.e. 13354 or 60.6). In addition, you can use the following two hex styles:
- Prefix with 0x - 0xFFFF00
- Prefix with ? - ?FFFF00
String constants can be any character in between single or double qoutes. There is no difference between the two. You can add a newline character by using \n.
In order to create an array, just assign a variable to an index like so:
array1[0] = "I'm in an array!";
array2[0, 0] = "I'm in a 2-Dimensional array!";
You can also create a 1D array in the following ways:
var arr = array_create(5)
- `var arr = [0, 1, 2, 3];