version 1.165, 2008/10/25 17:18:42
|
version 1.166, 2009/01/20 20:09:26
|
Line 163 has? os 0= [IF]
|
Line 163 has? os 0= [IF]
|
over c@ '' = if |
over c@ '' = if |
1 /string s'>unumber? exit |
1 /string s'>unumber? exit |
endif |
endif |
base @ >r getbase sign? >r |
base @ >r getbase sign? |
0. 2swap |
over if |
BEGIN ( d addr len ) |
>r 0. 2swap |
dup >r >number dup |
BEGIN ( d addr len ) |
WHILE \ there are characters left |
dup >r >number dup |
dup r> - |
WHILE \ there are characters left |
WHILE \ the last >number parsed something |
dup r> - |
dup 1- dpl ! over c@ [char] . = |
WHILE \ the last >number parsed something |
WHILE \ the current char is '.' |
dup 1- dpl ! over c@ [char] . = |
1 /string |
WHILE \ the current char is '.' |
REPEAT THEN \ there are unparseable characters left |
1 /string |
2drop rdrop false |
REPEAT THEN \ there are unparseable characters left |
|
2drop rdrop false |
|
ELSE |
|
rdrop 2drop r> ?dnegate true |
|
THEN |
ELSE |
ELSE |
rdrop 2drop r> ?dnegate true |
drop 2drop 0. false THEN |
THEN |
|
r> base ! ; |
r> base ! ; |
|
|
\ ouch, this is complicated; there must be a simpler way - anton |
\ ouch, this is complicated; there must be a simpler way - anton |