You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
THRU loads blocks from "last" to "first" because it uses the index value of a FOR loop. This is the reverse of all other Forths I use, including Pygmy for DOS. I solved the issue by copying the THRU definition from Pygmy for DOS, pygmy.scr block 83 to pygmy.fth, producing this:
: THRU ( first last -)
OVER - 1+ FOR ( n) DUP PUSH LOAD POP 1+ NEXT DROP ;
With the attached block file, thru-test.scr.txt, before the fix we see this:
> " thru-test.scr.txt" OPEN
ok
> 1 LOAD
loading 2 4 THRU
block 5
block 4
block 3
HI ?
With the fix applied, it runs like this:
> " thru-test.scr.txt" OPEN
ok
> 1 LOAD
loading 2 4 THRU
block 2
block 3
block 4
block 5
ok
> BYE
The text was updated successfully, but these errors were encountered:
THRU loads blocks from "last" to "first" because it uses the index value of a FOR loop. This is the reverse of all other Forths I use, including Pygmy for DOS. I solved the issue by copying the THRU definition from Pygmy for DOS, pygmy.scr block 83 to pygmy.fth, producing this:
With the attached block file, thru-test.scr.txt, before the fix we see this:
With the fix applied, it runs like this:
The text was updated successfully, but these errors were encountered: