version 1.17, 1997/07/31 16:17:06
|
version 1.19, 1998/12/08 22:02:36
|
Line 1
|
Line 1
|
\ A less simple implementation of the blocks wordset. |
\ A less simple implementation of the blocks wordset. |
|
|
\ Copyright (C) 1995 Free Software Foundation, Inc. |
\ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 59 Defer flush-blocks
|
Line 59 Defer flush-blocks
|
|
|
: open-blocks ( addr u -- ) \ gforth |
: open-blocks ( addr u -- ) \ gforth |
\g use the file, whose name is given by @var{addr u}, as blocks file |
\g use the file, whose name is given by @var{addr u}, as blocks file |
2dup ['] open-fpath-file catch 0<> |
2dup open-fpath-file 0<> |
if |
if |
2drop r/w bin create-file throw |
r/w bin create-file throw |
else |
else |
rot close-file throw 2dup file-status throw bin open-file throw |
rot close-file throw 2dup file-status throw bin open-file throw |
>r 2drop r> |
>r 2drop r> |
Line 164 User scr 0 scr !
|
Line 164 User scr 0 scr !
|
|
|
: load ( i*x n -- j*x ) |
: load ( i*x n -- j*x ) |
push-file |
push-file |
dup loadline ! blk ! >in off ( ['] ) interpret ( catch ) |
dup loadline ! blk ! >in off ['] interpret catch |
pop-file ( throw ) ; |
pop-file throw ; |
|
|
: thru ( i*x n1 n2 -- j*x ) |
: thru ( i*x n1 n2 -- j*x ) |
1+ swap ?DO I load LOOP ; |
1+ swap ?DO I load LOOP ; |