From f08769855d344255703d310722c4da04f3558896 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sat, 20 Apr 2024 16:08:37 -0700 Subject: [PATCH] Make notfound work right with word name. --- common/boot.fs | 2 +- common/io.fs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/boot.fs b/common/boot.fs index 7c84238..a07a82b 100644 --- a/common/boot.fs +++ b/common/boot.fs @@ -69,7 +69,7 @@ create NEXT ' donext @ ' next ! : next -1 nest-depth +! ['] next , , ; immed dup RECTYPE-NONE <> if rdrop rdrop rdrop rdrop exit then drop r> r> r> then next - drop 2drop RECTYPE-NONE + drop RECTYPE-NONE ; ( Define a recognizer stack. ) diff --git a/common/io.fs b/common/io.fs index 9a27a22..0bc82b9 100644 --- a/common/io.fs +++ b/common/io.fs @@ -57,7 +57,7 @@ variable hld ( Better Errors ) : notfound ( a n n -- ) - if cr ." ERROR: " type ." NOT FOUND!" cr -1 throw then ; + dup if cr ." ERROR: " >r type r> ." NOT FOUND!" cr throw else drop then ; ' notfound 'notfound ! ( Abort )