Trying to build a forth runtime in C
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
: test1 begin dup while 1 - dup . repeat ;
|
|
|
|
10 test1
|
|
|
|
|
|
|
|
: test2 begin 1 - dup . dup 0= until ;
|
|
|
|
10 test2
|
|
|
|
|
|
|
|
: test3
|
|
|
|
dup .
|
|
|
|
begin
|
|
|
|
1 - dup
|
|
|
|
|
|
|
|
." ( "
|
|
|
|
5 begin dup while 1 - dup . repeat
|
|
|
|
." ) " drop
|
|
|
|
|
|
|
|
.
|
|
|
|
dup 0=
|
|
|
|
until ;
|
|
|
|
|
|
|
|
3 test3
|