Revision history for KeyPgBit


Revision [21591]

Last edited on 2016-09-12 07:13:13 by fxm [Added a precision on bit indexing range]
Additions:
The valid range of values for ##//bit_number//## depends on the size, in bits, of `##[[KeyPgTypeof|Typeof]](//value//)##`, which is `##0##` (from the lowest bit) through `##[[KeyPgSizeof|Sizeof]](//value//) * 8 - 1##` (up to the highest bit). See [[TblVarTypes|Standard Datatype Limits]] for a table of the standard datatypes and their sizes.
Deletions:
The valid range of values for ##//bit_number//## depends on the size, in bits, of `##[[KeyPgTypeof|Typeof]](//value//)##`, which is `##0##` through `##[[KeyPgSizeof|Sizeof]](//value//) * 8 - 1##`. See [[TblVarTypes|Standard Datatype Limits]] for a table of the standard datatypes and their sizes.


Revision [21588]

Edited on 2016-09-12 06:49:25 by fxm [Added the valid range of values for 'bit_number']
Additions:

The valid range of values for ##//bit_number//## depends on the size, in bits, of `##[[KeyPgTypeof|Typeof]](//value//)##`, which is `##0##` through `##[[KeyPgSizeof|Sizeof]](//value//) * 8 - 1##`. See [[TblVarTypes|Standard Datatype Limits]] for a table of the standard datatypes and their sizes.


Revision [20063]

Edited on 2016-02-10 15:54:56 by DkLwikki [Update link format]
Additions:
[[KeyPgPpdefine|#define]] **Bit**( //value//, //bit_number// ) (((//value//) [[KeyPgOpAnd|and]] ([[KeyPgCast|Cast]]([[KeyPgTypeof|TypeOf]](//value//), 1) [[KeyPgOpShiftLeft|shl]] (//bit_number//))) <> 0)
Returns an ##[[KeyPgInteger|Integer]]## value of ##-1## if the bit is set, or ##0## if the bit is cleared.
This macro expands to an integer value indicating whether or not the bit specified by ##//bit_number//## is set in the integer ##//value//##. Behaves as `##(//value// [[KeyPgOpAnd|And]] 1 [[KeyPgOpShiftLeft|Shl]] //bit_number//) <> 0##`.
- Not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Bit""**##.
- ##[[KeyPgBitset|Bitset]]##
- ##[[KeyPgBitreset|Bitreset]]##
Deletions:
[[KeyPgPpdefine #define]] **Bit**( //value//, //bit_number// ) (((//value//) [[KeyPgOpAnd and]] ([[KeyPgCast Cast]]([[KeyPgTypeof TypeOf]](//value//), 1) [[KeyPgOpShiftLeft shl]] (//bit_number//))) <> 0)
Returns an ##[[KeyPgInteger Integer]]## value of ##-1## if the bit is set, or ##0## if the bit is cleared.
This macro expands to an integer value indicating whether or not the bit specified by ##//bit_number//## is set in the integer ##//value//##. Behaves as `##(//value// [[KeyPgOpAnd And]] 1 [[KeyPgOpShiftLeft Shl]] //bit_number//) <> 0##`.
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Bit""**##.
- ##[[KeyPgBitset Bitset]]##
- ##[[KeyPgBitreset Bitreset]]##


Revision [15850]

Edited on 2012-01-26 16:42:54 by DkLwikki [__bit() now works in -lang qb]
Additions:
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Bit""**##.
Deletions:
- Not available in the //[[CompilerOptlang -lang qb]]// dialect.


Revision [14807]

Edited on 2010-08-22 09:09:55 by GaLeon [Changed case]
Additions:
[[KeyPgPpdefine #define]] **Bit**( //value//, //bit_number// ) (((//value//) [[KeyPgOpAnd and]] ([[KeyPgCast Cast]]([[KeyPgTypeof TypeOf]](//value//), 1) [[KeyPgOpShiftLeft shl]] (//bit_number//))) <> 0)
Deletions:
[[KeyPgPpdefine #define]] **Bit**( //value//, //bit_number// ) (((//value//) [[KeyPgOpAnd and]] ([[KeyPgCast Cast]]([[KeyPgTypeof TypeOf]](//Value//), 1) [[KeyPgOpShiftLeft shl]] (//bit_number//))) <> 0)


Revision [14037]

Edited on 2008-12-13 13:01:32 by LaananFisher [Updated: minor formatting]
Additions:
//result// = **Bit**( //value//, //bit_number// )
Deletions:
//result// = **Bit**(//value//, //bit_number//)


Revision [13870]

Edited on 2008-11-05 18:01:29 by CountingPine [Formatting; small correction]
Additions:
Returns an ##[[KeyPgInteger Integer]]## value of ##-1## if the bit is set, or ##0## if the bit is cleared.
This macro expands to an integer value indicating whether or not the bit specified by ##//bit_number//## is set in the integer ##//value//##. Behaves as `##(//value// [[KeyPgOpAnd And]] 1 [[KeyPgOpShiftLeft Shl]] //bit_number//) <> 0##`.
- New to ""FreeBASIC""
Deletions:
Returns an ##[[KeyPgInteger Integer]]## value of `##-1##` if the bit is set, or `##0##` if the bit is cleared.
This macro expands to an integer value indicating whether or not the bit specified by ##//bit_number//## is set in the integer ##//value//##. Behaves as `##//value// [[KeyPgOpAnd And]] 1 [[KeyPgOpShiftLeft Shl]] //bit_number//##`.
- New to FreeBASIC


Revision [13408]

The oldest known version of this page was created on 2008-05-31 14:04:40 by JeffMarshall [Formatting; small correction]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode