Quote:
Originally Posted by adma
Oh wow, it is too. When I read "real data types" I auto assumed memory allocation was different also. Nice to know!
|
It's a property of the Pawn language. In Pawn, everything is a cell... and internally, a cell is just a 32-bit signed integer.
- int is just a plain cell
- Float / float is just an IEE754 single precision floating point value stored in a cell. Pawn / SourcePawn has special math operators for it that are automatically called when you do math involving a float.
- String / char are just a cell array where it stuffs 4 chars into each cell. Regular Pawn uses a different syntax for packed strings, but they operate basically the same as SourcePawn's
- Handles (including methodmaps derived from Handles) are just a C++ memory address, albeit safer than a C++ pointer because SM tracks which handles are valid.
- enum structs (Old type and SM 1.10 type) are just a cell array with special language syntax surrounding them.
__________________