bit.print_hex_uintΒΆ
print x[:n] as an unsigned hexadecimal number, without leading zeros (digits & capital-letters).
x_prefix (constant): print with the β0xβ prefix.
@Assumes n can be divided by 4.
SignatureΒΆ
def print_hex_uint n, x, x_prefix @ after_print_x, printed_flag, end { ... }
Defined in bit/output.fj β lines 76β92 (view on GitHub).
ComplexityΒΆ
Time:
n(7@+11)Space:
n(7@+11)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def print_hex_uint n, x, x_prefix @ after_print_x, printed_flag, end {
stl.comp_if0 x_prefix, after_print_x
stl.output '0'
stl.output 'x'
after_print_x:
.zero printed_flag
rep(n/4, i) .print_hex_uint.print_digit x+(n/4-1-i)*4*dw, printed_flag
.if1 printed_flag, end
stl.output '0'
;end
printed_flag:
.bit
end:
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
bit.print_hex_intinbit/output.fj
β Previous: bit.print_as_digit/2
Next: bit.print_hex_uint.print_digit β