hex.print_uintΒΆ
print the unsigned x[:n], without leading zeros.
x_prefix (constant): print with the β0xβ prefix.
use_uppercase (constant): if true, print in uppercase (else lowercase).
SignatureΒΆ
def print_uint n, x, x_prefix, use_uppercase @ after_prefix, printed_something, end { ... }
Defined in hex/output.fj β lines 161β174 (view on GitHub).
ComplexityΒΆ
Time:
n(2@+6)Space:
n(3@+54)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def print_uint n, x, x_prefix, use_uppercase @ after_prefix, printed_something, end {
bit.zero printed_something
stl.comp_if0 x_prefix, after_prefix
stl.output "0x"
after_prefix:
rep(n, i) .print_uint.print_digit x+(n-1-i)*dw, printed_something, use_uppercase
bit.if1 printed_something, end
stl.output '0'
;end
printed_something: bit.bit
end:
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.print_intinhex/output.fj
β Previous: hex.print_as_digit/3
Next: hex.print_uint.print_digit β