Keywords: Operators
char
char returns the number of cells required to hold the given number of characters in a packed string. I.e. the number of 4-byte cells required to hold a given number of bytes. For example:
Returns 1.
Returns 1 (you can't have 3/4 of a variable).
Returns 64 (256 divided by 4).
This is generally used in variable declarations.
Will make an array 10 cells big.
For more information on packed strings read pawn-lang.pdf.
defined
Checks if a symbol exists. Generally used in #if statements:
Most commonly it's used to check if a define is defined and generate code accordingly:
sizeof
Returns the size in ELEMENTS of an array:
Output:
And:
Gives:
state
This again is related to the PAWN autonoma code and thus not covered here.
tagof
This returns a number representing the tag of a variable:
Gives:
Which is a slight bug but basically means:
To check, for example, if a variable is a float (with the tag 'Float:'):