Revision history for KeyPgInteger


Revision [22003]

Last edited on 2017-11-21 01:11:07 by JeffMarshall [fix page link name case]
Additions:
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftLeft|Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftLeft|Shl]] (//bits//-1)) - 1##. The selected data type is ##[[KeyPgByte|Byte]]## for **Integer<8>**, ##[[KeyPgShort|Short]]## for **Integer<16>**, ##[[KeyPgLong|Long]]## for **Integer<32>** and ##[[KeyPgLongint|LongInt]]## for **Integer<64>**.
Deletions:
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)) - 1##. The selected data type is ##[[KeyPgByte|Byte]]## for **Integer<8>**, ##[[KeyPgShort|Short]]## for **Integer<16>**, ##[[KeyPgLong|Long]]## for **Integer<32>** and ##[[KeyPgLongint|LongInt]]## for **Integer<64>**.


Revision [21558]

Edited on 2016-08-15 13:21:19 by DkLwikki [Combine integer<N> paragraphs]
Additions:
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)) - 1##. The selected data type is ##[[KeyPgByte|Byte]]## for **Integer<8>**, ##[[KeyPgShort|Short]]## for **Integer<16>**, ##[[KeyPgLong|Long]]## for **Integer<32>** and ##[[KeyPgLongint|LongInt]]## for **Integer<64>**.
Deletions:
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)) - 1##.

The selected data type is ##[[KeyPgByte|Byte]]## for **Integer<8>**, ##[[KeyPgShort|Short]]## for **Integer<16>**, ##[[KeyPgLong|Long]]## for **Integer<32>** and ##[[KeyPgLongint|LongInt]]## for **Integer<64>**.


Revision [20954]

Edited on 2016-03-13 03:52:18 by fxm [Formatting]
Additions:


Revision [20282]

Edited on 2016-02-10 16:01:40 by DkLwikki [Update link format]
Additions:
Standard data type: 32-bit or 64-bit signed, same size as ##[[KeyPgSizeof|SizeOf]]([[KeyPgAny|Any]] [[KeyPgPtr|Ptr]])##
[[KeyPgDim|dim]] //variable// [[KeyPgAs|as]] **Integer**
[[KeyPgDim|dim]] //variable// [[KeyPgAs|as]] **Integer**<//bits//>
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft|Shl]] (//bits//-1)) - 1##.
The selected data type is ##[[KeyPgByte|Byte]]## for **Integer<8>**, ##[[KeyPgShort|Short]]## for **Integer<16>**, ##[[KeyPgLong|Long]]## for **Integer<32>** and ##[[KeyPgLongint|LongInt]]## for **Integer<64>**.
- In the //[[CompilerOptlang|-lang fb]]// and //[[CompilerOptlang|-lang fblite]]// dialects, the ##**Integer**## data type is 32-bit.
- In the //[[CompilerOptlang|-lang qb]]// dialect, the ##**Integer**## data type is 16-bit, regardless of platform.
- ##[[KeyPgLong|Long]]##
- ##[[KeyPgLongint|Longint]]##
- ##[[KeyPgUinteger|Uinteger]]##
- ##[[KeyPgCint|Cint]]##
Deletions:
Standard data type: 32-bit or 64-bit signed, same size as ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##
[[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Integer**
[[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Integer**<//bits//>
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft Shl]] (//bits//-1)) - 1##.
The selected data type is ##[[KeyPgByte Byte]]## for **Integer<8>**, ##[[KeyPgShort Short]]## for **Integer<16>**, ##[[KeyPgLong Long]]## for **Integer<32>** and ##[[KeyPgLongint LongInt]]## for **Integer<64>**.
- In the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects, the ##**Integer**## data type is 32-bit.
- In the //[[CompilerOptlang -lang qb]]// dialect, the ##**Integer**## data type is 16-bit, regardless of platform.
- ##[[KeyPgLong Long]]##
- ##[[KeyPgLongint Longint]]##
- ##[[KeyPgUinteger Uinteger]]##
- ##[[KeyPgCint Cint]]##


Revision [19860]

Edited on 2016-02-06 04:10:42 by fxm [Added correspondance between Integer<bits> a]
Additions:
The selected data type is ##[[KeyPgByte Byte]]## for **Integer<8>**, ##[[KeyPgShort Short]]## for **Integer<16>**, ##[[KeyPgLong Long]]## for **Integer<32>** and ##[[KeyPgLongint LongInt]]## for **Integer<64>**.


Revision [16680]

Edited on 2013-03-27 20:38:15 by DkLwikki [Update for 64bit branch]
Additions:
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft Shl]] (//bits//-1)) - 1##.
Deletions:
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft Shl]] (//bits-1)) - 1##.


Revision [16679]

Edited on 2013-03-27 20:36:43 by DkLwikki [Update for 64bit branch]
Additions:
Standard data type: 32-bit or 64-bit signed, same size as ##[[KeyPgSizeof SizeOf]]([[KeyPgAny Any]] [[KeyPgPtr Ptr]])##
32-bit or 64-bit signed whole-number data type, depending on the platform.

**Integer** is the main data type ""FreeBASIC"" uses for integer math and bitwise operations. It is the default type for number literals.

#if __FB_64BIT__
Dim x As Integer = &H8000000000000000
Dim y As Integer = &H7FFFFFFFFFFFFFFF
Print "Integer Range = "; x; " to "; y
#else
Dim x As Integer = &H80000000
Dim y As Integer = &H7FFFFFFF
Print "Integer Range = "; x; " to "; y
#endif
- In the //[[CompilerOptlang -lang qb]]// dialect, the ##**Integer**## data type is 16-bit, regardless of platform.
Deletions:
Standard data type: 32 bit signed
By default, a 32-bit signed whole-number data type. Can hold values from ##-2147483648## to ##2147483647##.
Dim x As Integer = &H80000000
Dim y As Integer = &H7FFFFFFF
Print "Integer Range = "; x; " to "; y
**Output:**
%%Integer Range = -2147483648 to 2147483647%%
- In the //[[CompilerOptlang -lang qb]]// dialect, the ##**Integer**## data type is 16-bit.


Revision [16592]

Edited on 2013-02-23 19:29:44 by CountingPine [New feature: Integer<n>]
Additions:
[[KeyPgDim dim]] //variable// [[KeyPgAs as]] **Integer**<//bits//>
{{fbdoc item="param"}}
##//bits//##
A numeric constant expression indicating the size in bits of integer desired. The values allowed are ##8##, ##16##, ##32## or ##64##.
By default, a 32-bit signed whole-number data type. Can hold values from ##-2147483648## to ##2147483647##.
If an explicit bit size is given, a data type is provided that can hold values from ##-1LL [[KeyPgOpShiftleft Shl]] (//bits//-1)## up to ##(1LL [[KeyPgOpShiftleft Shl]] (//bits-1)) - 1##.
**Output:**
%%Integer Range = -2147483648 to 2147483647%%
- The ability to select a bit size is new to ""FreeBASIC""
- The INTEGER type is always 16 bits wide in QB.
Deletions:
32-bit signed whole-number data type. Can hold values from -2147483648 to 2147483647. (See ##[[KeyPgLongint Longint]]## for 64-bit integers.)
**Output:**
%%Integer Range = -2147483648 to 2147483647%%
- The INTEGER type is 16 bits wide in QB.
- None, if compiled in the //[[CompilerOptlang -lang qb]]// dialect.


Revision [15854]

Edited on 2012-01-26 17:46:18 by CountingPine ["16-bit wide"->"16 bits wide"]
Additions:
- The INTEGER type is 16 bits wide in QB.
Deletions:
- The INTEGER type is 16-bit wide in QB.


Revision [15524]

Edited on 2011-11-25 03:29:18 by PaulRobinson ["16-bit wide"->"16 bits wide"]
Additions:
32-bit signed whole-number data type. Can hold values from -2147483648 to 2147483647. (See ##[[KeyPgLongint Longint]]## for 64-bit integers.)
- ##[[KeyPgLongint Longint]]##
Deletions:
32-bit signed whole-number data type. Can hold values from -2147483648 to 2147483647.


Revision [13087]

The oldest known version of this page was created on 2008-04-23 12:55:59 by AntoniGual ["16-bit wide"->"16 bits wide"]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode