Handbook
Glossary
with-radix-char ( i number-parse n radix-quot nonradix-quot -- n/f )
Vocabulary
math
.
parser
.
private
Inputs
i
an
object
number-parse
an
object
n
an
object
radix-quot
an
object
nonradix-quot
an
object
Outputs
n/f
an
object
Definition
USING:
combinators
kernel
sequences
;
IN:
math.parser.private
:
with-radix-char
( i number-parse n radix-quot nonradix-quot -- n/f )
[
rot
{
{
[
dup
"bB"
member-eq?
]
[
2drop
2
->radix
require-next-digit
]
}
{
[
dup
"oO"
member-eq?
]
[
2drop
8
->radix
require-next-digit
]
}
{
[
dup
"xX"
member-eq?
]
[
2drop
16
->radix
require-next-digit
]
}
[
nipd
swap
call
]
}
cond
]
2curry
next-digit
;
inline