The OpenD Programming Language

bt

Tests the bit.

bt
(
Field
T = typeof(Field.init[size_t.init])
)
(
auto ref Field p
,
size_t bitnum
)
if (
__traits(isUnsigned, T)
)

Return Value

Type: auto

A non-zero value if the bit was set, and a zero if it was clear.

Examples

size_t[2] array;

array[0] = 2;
array[1] = 0x100;

assert(bt(array.ptr, 1));
assert(array[0] == 2);
assert(array[1] == 0x100);

Meta