SOLVED!
Question about Bitest and Bitest ??

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-11-01 12:10 PM
‎2019-11-01
12:10 PM
Can someone put a practical example for the use of BITEST & BITSET ?
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-11-01 02:46 PM
‎2019-11-01
02:46 PM
The masking and status values of some other GDL commands are based on set and unset bits of their binary notation. These functions can be analyzed in binary form.
Example: You have a masking Value of 63, which is1 *1 + 1 *2 + 1 *4 + 1 *8 + 1 *16 + 1 *32
With Bittest you can check, which of these Bits are set or you can check if one of the Bits is set.
val = 63
TEXT2 0, 0, BITTEST(val, 4) ! = 1
This checks, if the 5th value is set (the value 16); the 1st value (1) is on position 0,
so you have to check
TEXT2 0, 0, BITTEST(val, 0) ! = 1
The binary notation of 63 would be 111111 (this is identical with the italic written 1s above), of 64 would be 1000000
Example: You have a masking Value of 63, which is
With Bittest you can check, which of these Bits are set or you can check if one of the Bits is set.
val = 63
TEXT2 0, 0, BITTEST(val, 4) ! = 1
This checks, if the 5th value is set (the value 16); the 1st value (1) is on position 0,
so you have to check
TEXT2 0, 0, BITTEST(val, 0) ! = 1
The binary notation of 63 would be 111111 (this is identical with the italic written 1s above), of 64 would be 1000000
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
2 REPLIES 2
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-11-01 02:46 PM
‎2019-11-01
02:46 PM
The masking and status values of some other GDL commands are based on set and unset bits of their binary notation. These functions can be analyzed in binary form.
Example: You have a masking Value of 63, which is1 *1 + 1 *2 + 1 *4 + 1 *8 + 1 *16 + 1 *32
With Bittest you can check, which of these Bits are set or you can check if one of the Bits is set.
val = 63
TEXT2 0, 0, BITTEST(val, 4) ! = 1
This checks, if the 5th value is set (the value 16); the 1st value (1) is on position 0,
so you have to check
TEXT2 0, 0, BITTEST(val, 0) ! = 1
The binary notation of 63 would be 111111 (this is identical with the italic written 1s above), of 64 would be 1000000
Example: You have a masking Value of 63, which is
With Bittest you can check, which of these Bits are set or you can check if one of the Bits is set.
val = 63
TEXT2 0, 0, BITTEST(val, 4) ! = 1
This checks, if the 5th value is set (the value 16); the 1st value (1) is on position 0,
so you have to check
TEXT2 0, 0, BITTEST(val, 0) ! = 1
The binary notation of 63 would be 111111 (this is identical with the italic written 1s above), of 64 would be 1000000
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-11-01 03:17 PM
‎2019-11-01
03:17 PM
Thank you Joachim Suehlo
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
