Navigation:  thinBasic language > Data types and variables >

Numeric variables

Previous pageReturn to chapter overviewNext page

 

Numeric variables

 

The following numeric data types are supported:

Group

Data type

Bits

Bytes

Range from

Range to

Digits of precision

Integer data types

BYTE

8

1

0

255

n/a


INTEGER

16

2

-32768

32767

n/a


WORD

16

2

0

65535

n/a


DWORD

32

4

0

4294967295

n/a


LONG

32

4

-2147483648

2147483647

n/a


QUAD

64

8

-9.22x10^18

+9.22x10^18

n/a

Floating point data types

SINGLE

32

4

8.43x10^-37

3.40x10^38

6


DOUBLE

64

8

4.19x10^-307

1.79x10^308

16


EXTENDED (EXT)

80

10

3.4x10^-4932

1.2x10^4932

18


CURRENCY

64

8

-9.22x10^14

+9.22x10^14

4

 

Restrictions

 

1.thinBasic perform all internal numeric calculations using EXTENDED (abbreviated EXT) data type.
2.due to lack of precision (only 6 digits), we suggest to use SINGLE data type only when interfacing to external libraries that explicitly ask for SINGLE parameters passed by reference.