hex.input_dec_int

dst[:n] = the signed decimal number read from input (two’s complement, mod 16^n).
Reads an optional leading ‘-’, then ASCII ‘0’..’9’ until a ‘\n’/’\0’ terminator; jumps to error on any other byte

Signature

def input_dec_int n, dst, error @ valid_lo, stopper, ok { ... }

Defined in hex/input.fj — lines 178–186 (view on GitHub).

Complexity

  • Time: ~ nd(10@+39)    (d = number of digits)

  • Space: ~ n(10.5@+167)

See the complexity glossary for what @, w, dw, dbit, n mean.

Requires init

The following must be initialised before this macro is invoked:

  • hex.init

Source

Depends on


← Previous: hex.input_dec_uint