Difference between revisions of "Template:DataTypeTable"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 6: Line 6:
 
! colspan="5" | Numeric types
 
! colspan="5" | Numeric types
 
|-
 
|-
! Name || Type suffix symbol || Minimum value || Maximum value || Size (in bits)
+
!  Type Name || Type suffix symbol || Minimum value || Maximum value || Size (in bits)
 
|-
 
|-
 
| align="center" | [[_BIT]]                    || align="center" | `  || align="right" |                      -1 || align="right" |                        0 || align="center" | 1
 
| align="center" | [[_BIT]]                    || align="center" | `  || align="right" |                      -1 || align="right" |                        0 || align="center" | 1
Line 53: Line 53:
 
! colspan="5" | String type
 
! colspan="5" | String type
 
|-
 
|-
! Name || Type suffix symbol || Minimum length || Maximum length || Size (in bytes)
+
!       Type Name      || Type suffix symbol || Minimum length || Maximum length || Size (in bytes)
 
|-
 
|-
| align="center" | [[STRING]]                   || align="center" | $     || align="right" | 0 || align="right" | 2,147,483,647  || align="center" | Use [[LEN]]
+
| align="center" |           [[STRING]]               || align="center" | $ || align="right" |            0 || align="right" |               2,147,483,647  || align="center" | Use [[LEN]]
 
|-
 
|-
| align="center" | [[STRING|STRING * ''n'']]            || align="center" | $''n'' || align="right" | 1 || align="right" | 2,147,483,647  || align="center" | n
+
| align="center" |         [[STRING|STRING * ''n'']]            || align="center" | $''n'' || align="right" |         1 || align="right" |       2,147,483,647  || align="center" | n
 
|}
 
|}
 
|}
 
|}

Revision as of 20:58, 22 July 2012

Numeric types
 Type Name Type suffix symbol Minimum value Maximum value Size (in bits)
_BIT ` -1 0 1
_BIT * n `n -128 127 n
_UNSIGNED _BIT ~` 0 1 1
_BYTE %% -128 127 8
_UNSIGNED _BYTE ~%% 0 255 8
INTEGER % -32,768 32,767 16
_UNSIGNED INTEGER ~% 0 65,535 16
LONG & -2,147,483,648 2,147,483,647 32
_UNSIGNED LONG ~& 0 4,294,967,395 32
_INTEGER64 && -9,223,372,036,854,775,808 9,223,372,036,854,775,807 64
_UNSIGNED _INTEGER64 ~&& 0 18,446,744,073,709,551,615 64
SINGLE ! ±2.802597E-45 ±3.402823E+38 32
DOUBLE # ±4.490656458412465E-324 ±1.797693134862310E+308 64
_FLOAT ## ±1.18E−4932 ±1.18E+4932 256(80 used)
_OFFSET %& -9,223,372,036,854,775,808 9,223,372,036,854,775,807 Use LEN
_UNSIGNED _OFFSET ~%& 0 18,446,744,073,709,551,615 Use LEN
_MEM none combined memory variable type N/A Use LEN
 
Note: For the floating-point numeric types SINGLE, DOUBLE and _FLOAT, the minimum values represent the smallest values closest to zero, while the maximum values represent the largest values closest to ±infinity.


String type
      Type Name       Type suffix symbol Minimum length Maximum length Size (in bytes)
STRING $            0               2,147,483,647 Use LEN
STRING * n $n         1       2,147,483,647 n


Note: For the fixed-length string type STRING * n, where n is an integer length value from 1 (one) to 2,147,483,647.