karl@sugar.uu.net (Karl Lehenbauer) (01/22/89)
There are a couple of bugs still in text file including in A4th v0 on uunet. Specifically, after getting an error in a text include file, although Forth works again, it gurus a lot when you do a 'bye', and Forth leaves the file locked so you can't reedit it. The new version of Include.blk screen 18, below, solves this problem. I think the only actual change is the call to 'text>' on line 7. A still-unfixed bug is that the line count printed in the error message when text files fail to load does not include blank lines. Scr # 18 Include.blk 0 \ redefine ?error so (source) will be restored 1 2 : t?error (s addr len f -- ) 3 if ['] (source) is source ['] (?error) is ?error 4 >r >r sp0 @ sp! 5 r> r> space type 6 ." occured at file '" 'name dup a"count type 7 ." ' line " lineno @ . text> 8 blk @ if >in @ blk @ where then 9 quit 10 else 2drop then 11 ; 12 13 14 15 -- -- uunet!sugar!karl | "We've been following your progress with considerable -- karl@sugar.uu.net | interest, not to say contempt." -- Zaphod Beeblebrox IV -- Usenet BBS (713) 438-5018