bit.print_hex_intΒΆ
print x[:n] as a signed 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_int n, x, x_prefix @ do_print, end, neg { ... }
Defined in bit/output.fj β lines 122β135 (view on GitHub).
ComplexityΒΆ
Time:
n(7@+13)Space:
n(7@+13)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def print_hex_int n, x, x_prefix @ do_print, end, neg {
.zero neg
.if0 x+(n-1)*dw, do_print
.not neg
stl.output '-'
.neg n, x
do_print:
.print_hex_uint n, x, x_prefix
.if0 neg, end
.neg n, x
;end
neg: .bit
end:
}
Depends onΒΆ
β Previous: bit.print_hex_uint.print_digit
Next: bit.print_dec_uint β