This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
String variables
String variables are stored internally as Dynamic Strings. Dynamic strings contain a variable-length string that can be up to approximately 2 billion characters in length.
There are also fixed-len strings or fixed-len ASCIIZ strings. In this case the size of the allocated buffer is fixed when variable is declared and not dynamic based on variable content.
The following string data types are supported:
Data type |
Bytes |
More .... |
STRING |
4 |
Plus the size of the string (up to 2Gb). No need to worry about size: thinBasic will automatically allocate/de-allocate data when needed
Dim MyVar As String
|
ASCIIZ |
4 |
Plus the size of the string (up to 2Gb) plus 1, the $NUL char
Dim MyVar As Asciiz
|
Fixed-len STRING |
The fixed size is declared in DIM statement using:
Dim MyVar As STRING * SIZE
where size is the size in bytes of the fixed string. |
|
Fixed-len ASCIIZ |
The fixed size is declared in DIM statement using:
Dim MyVar As ASCIIZ * SIZE
where SIZE is the size in bytes of the fixed string. |
|
WString |
Used in DECLARE ... statement to define unicode dynamic string |
|
WStringZ |
Used in DECLARE ... statement to define unicode fixed string |