hex.hex (arity 1)¶
Hexadecimal variable with initial value.
You can’t place it as you would any other standard library macro, because “running” this line is undefined behavior. All bit, bit.vec, hex, and hex.vec declarations should be placed in a region of memory that won’t ever be executed — typically below stl.loop.
Signature¶
def hex val { ... }
Defined in hex/memory.fj — lines 10–12 (view on GitHub).
Complexity¶
Time:
0 (data declaration)Space:
1
See the complexity glossary for what @, w, dw, dbit, n mean.
Source¶
Click to view the macro body
def hex val {
;(val > 0xf ? 0xf : (val < 0 ? 0 : val)) * dw
}
Used by¶
Example uses¶
hex.hexinhex/memory.fjhex.pointers.stack_initinhex/pointers/basic_pointers.fj
Next: hex.hex/0 →