hex.print_uint.print_digitΒΆ
print the ascii of the hexadecimal representation of hex (skip leading zeros, based on printed_something)
printed_something (bit [inout]): have any digit printed yet? (the macro also updates it)
use_uppercase (constant): if true, print in uppercase (else lowercase).
SignatureΒΆ
def print_digit hex, printed_something, use_uppercase @ print, end { ... }
Defined in hex/output.fj β lines 182β189 (view on GitHub).
ComplexityΒΆ
Time:
2@+6Space:
3@+54
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def print_digit hex, printed_something, use_uppercase @ print, end {
bit.if1 printed_something, print
..if0 hex, end
bit.not printed_something
print:
..print_as_digit hex, use_uppercase
end:
}
Depends onΒΆ
β Previous: hex.print_uint
Next: hex.print_int β