home *** CD-ROM | disk | FTP | other *** search
- \ FL.SEQ File selection. by Tom Zimmer
-
- ONLY FORTH DEFINITIONS ALSO
-
- defer getfile ( --- <a1> f1 ) \ return a1 filename addr and
-
- ' 0 is getfile \ Default to failed
-
- : file>tib ( a1 --- )
- count 2dup type space
- 2dup true rot rot over + swap
- do i c@ ascii . =
- if drop false leave
- then
- loop >r dup span ! dup #tib ! >in off
- tib swap cmove r>
- if ascii . span @ tib + c!
- span incr #tib incr
- then ;
-
- : GFL ( --- )
- >in @ span @ 1- >
- if getfile 0=
- abort" No filename specified"
- file>tib
- then ;
-
- : FILE ( --- )
- GFL BL WORD $HOPEN ABORT" File Open Error!"
- ERRORLINE OFF \ reset last line variable
- LOADLINE OFF \ reset file offset
- INLEN OFF ; \ Empty input buffer
-
- ' FILE ALIAS OPEN ( --- )
- ' FILE ALIAS FL ( --- )
-
- ONLY FORTH DEFINITIONS ALSO
-