My question is, how can I test individual bits defined with manifest
constant names in structures ?
I specifically want to use specs-if because I want to do something with
secondary(...) depending on a bit setting in a primary area.
Using bitand in specs... the doc says it works the same as rexx bitand, and
that works with two strings and returns a string...
Rexx:
say c2x( bitand('C','01'x) )
01
Exactly what I expected...
Pipelines:
I created a simple 1-byte structure with member "x", and manifest constants
for bits 0-7...
pipe strliteral xc3 | specs q byte print bitand(x,bit7) u2x | cons
000000C3
I wasn't expecting that result, so I'm clearly misunderstanding something.
As much as I *wanted *it work, I didn't *really *expect it to because the
manifest constant bit7 = 1 would probably be used as character string x'f1'.
But that hypothesis doesn't pan out either because the result would have
been C1
Looks like x'c3' has been and'd with x'ff', but where did the x'ff' come
from?
How can I coerce a manifest constant to a one-byte string?
Cheers,
Don