mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 17:08:07 +11:00
bd38d80f9c
and renamed it "Core words". Also, reworded the presentation.
9 lines
180 B
Plaintext
9 lines
180 B
Plaintext
( returns negative value on error )
|
|
: _ ( c -- n )
|
|
DUP '0' '9' =><= IF '0' - EXIT THEN
|
|
DUP 'a' 'f' =><= IF 0x57 ( 'a' - 10 ) - EXIT THEN
|
|
DROP -1 ( bad )
|
|
;
|
|
|
|
|