Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
gforth
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bernd Paysan
gforth
Commits
f24f0a3f
Commit
f24f0a3f
authored
Mar 24, 2009
by
anton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed NUMBER? into (NUMBER?) (Reason: NUMBER? is defined differently in F83)
parent
36b4ddb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
cross.fs
cross.fs
+5
-3
kernel/int.fs
kernel/int.fs
+3
-3
No files found.
cross.fs
View file @
f24f0a3f
...
...
@@ -191,7 +191,7 @@ Create bases 10 , 2 , A , 100 ,
1
+
THEN
;
:
number
?
(
string
--
string
0
/
n
-
1
/
d
0
>
)
:
(
number
?)
(
string
--
string
0
/
n
-
1
/
d
0
>
)
dup
>
r
count
snumber
?
dup
if
rdrop
else
...
...
@@ -199,13 +199,15 @@ Create bases 10 , 2 , A , 100 ,
then
;
:
number
(
string
--
d
)
number
?
?
dup
0
=
abort
" ?"
0
<
(
number
?)
?
dup
0
=
abort
" ?"
0
<
IF
s
>
d
THEN
;
[
THEN
]
[
IFUNDEF
]
(
number
?)
:
(
number
?)
number
?
;
[
THEN
]
\
this
provides
assert
(
and
struct
stuff
\
GFORTH
[
IFUNDEF
]
assert1
(
\
GFORTH
also
forth
definitions
require
assert
.
fs
previous
...
...
@@ -2535,7 +2537,7 @@ Cond: MAXI
IF
nip
execute
-
exec
-
compile
ELSE
gexecute
THEN
EXIT
THEN
number
?
dup
(
number
?)
dup
IF
0
>
IF
swap
lit
,
THEN
lit
,
discard
ELSE
2
drop
restore
-
input
throw
Ghost
gexecute
THEN
;
...
...
kernel/int.fs
View file @
f24f0a3f
...
...
@@ -113,7 +113,7 @@ Defer source ( -- c-addr u ) \ core
\
\
Number parsing 23feb93py
\
number?
number 23feb93py
\
(number?)
number 23feb93py
hex
const Create bases 0A , 10 , 2 , 0A ,
...
...
@@ -210,7 +210,7 @@ has? os 0= [IF]
1+
THEN ;
:
number?
( string -- string 0 / n -1 / d 0> )
:
(number?)
( string -- string 0 / n -1 / d 0> )
dup >r count snumber? dup if
rdrop
else
...
...
@@ -218,7 +218,7 @@ has? os 0= [IF]
then ;
: number ( string -- d )
number?
?dup 0= abort"
?
" 0<
(number?)
?dup 0= abort"
?
" 0<
IF
s>d
THEN ;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment