Skip to content

Commit 07b8cdf

Browse files
committed
Update datatype.bas example for 64bit port
1 parent a96dfa7 commit 07b8cdf

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

examples/datatype.bas

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
'' Integer types
2-
dim b as byte '' 1 byte
3-
dim sh as short '' 2 bytes
4-
dim i as integer '' 4 bytes (32bit type)
5-
dim l as long '' 4 bytes on Windows, 4/8 bytes elsewhere depending on pointer size
6-
dim ll as longint '' 8 bytes (64bit type)
2+
dim b as byte '' 8 bit integer (sizeof(byte ) = 1)
3+
dim sh as short '' 16 bit integer (sizeof(short ) = 2)
4+
dim l as long '' 32 bit integer (sizeof(long ) = 4)
5+
dim ll as longint '' 64 bit integer (sizeof(longint) = 8)
6+
dim i as integer '' 32 or 64 bit integer, depends on system (like pointers)
77

88
'' Unsigned versions
99
dim ub as ubyte
1010
dim ush as ushort
11-
dim ui as uinteger
1211
dim ul as ulong
1312
dim ull as ulongint
13+
dim ui as uinteger
1414

1515
'' Floating point types
1616
dim f as single '' 32bit float
1717
dim d as double '' 64bit float
1818

1919
'' Strings
20-
dim s as string '' variable-length single-byte string (up to 2 GB, may contain
21-
'' nulls, implicitly null-terminated for C compatibility)
20+
dim s as string '' variable-length single-byte string (up to 2 GB on 32bit and
21+
'' more on 64bit, may contain nulls, implicitly null-terminated
22+
'' for C compatibility)
2223

2324
dim fixstr as string * 5 '' fixed-length string (implicitly null-terminated)
2425

2526
dim z as zstring * 5+1 '' null-terminated fixed-length string
2627

2728
dim w as wstring * 5+1 '' same, but for Unicode, depends on system:
28-
'' UTF-16 on Windows: 2 byte units, 1 or 2 units (2 or 4 bytes) per Unicode character
29+
'' UTF-16 on Windows: 2 byte units, 1 or 2 units (2 or
30+
'' 4 bytes) per Unicode character
2931
'' UTF-32 on Linux: 4 bytes per Unicode character
3032

3133
'' User-defined types (UDTs): structures, classes

0 commit comments

Comments
 (0)