version 1.34, 2007/12/31 19:02:25
|
version 1.36, 2010/12/30 21:46:14
|
Line 22
|
Line 22
|
create included-files 0 , 0 , ( pointer to and count of included files ) |
create included-files 0 , 0 , ( pointer to and count of included files ) |
\ note: these names must not contain a "/" or "\"; otherwise a part of |
\ note: these names must not contain a "/" or "\"; otherwise a part of |
\ that name might be used when expanding "./" (see expandtopic). |
\ that name might be used when expanding "./" (see expandtopic). |
here ," *somewhere*" dup c@ swap 1 + swap |
here ," string.fs" dup c@ swap 1 + swap , A, |
, A, here 2 cells - |
here 2 cells - |
create image-included-files 1 , A, ( pointer to and count of included files ) |
create image-included-files 1 , A, ( pointer to and count of included files ) |
\ included-files points to ALLOCATEd space, while image-included-files |
\ included-files points to ALLOCATEd space, while image-included-files |
\ points to ALLOTed objects, so it survives a save-system |
\ points to ALLOTed objects, so it survives a save-system |
Line 33 create image-included-files 1 , A, ( poi
|
Line 33 create image-included-files 1 , A, ( poi
|
\G source. The result is valid only while the file is being |
\G source. The result is valid only while the file is being |
\G loaded. If the current input source is no (stream) file, the |
\G loaded. If the current input source is no (stream) file, the |
\G result is undefined. In Gforth, the result is valid during the |
\G result is undefined. In Gforth, the result is valid during the |
\G whole seesion (but not across @code{savesystem} etc.). |
\G whole session (but not across @code{savesystem} etc.). |
loadfilename 2@ ; |
loadfilename 2@ ; |
|
|
: sourceline# ( -- u ) \ gforth sourceline-number |
: sourceline# ( -- u ) \ gforth sourceline-number |
Line 137 create image-included-files 1 , A, ( poi
|
Line 137 create image-included-files 1 , A, ( poi
|
|
|
: .included ( -- ) \ gforth |
: .included ( -- ) \ gforth |
\G list the names of the files that have been @code{included} |
\G list the names of the files that have been @code{included} |
included-files 2@ 2 cells under+ 1- .strings ; |
included-files 2@ .strings ; |