Navigation: thinBasic language > Data types and variables > String variables |
|
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) |
ASCIIZ |
4 |
Plus the size of the string (up to 2Gb) plus 1, the $NUL char |
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. |
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |