cforth
cforth copied to clipboard
In order.fth, replace some uses of @/! with token@/token!
I'm proposing some changes to order.fth. I don't claim to understand the code but with the changes my test program goes a little bit further; even with the changes there are still problems with wordlists.
I just pushed a couple of commits that incorporate your fixes with a slightly different factoring. Let me know if it works for you.
I just pushed a couple of commits that incorporate your fixes with a slightly different factoring.
Yes, this is nicer.
Let me know if it works for you.
I think some of the @/! -> token@/token! replacements are needed because the following examples don't work:
shell> cforth
C Forth Copyright (c) 2008 FirmWorks
ok wordlist set-current order
context: forth forth root current: Address exception
shell> cforth
C Forth Copyright (c) 2008 FirmWorks
ok get-order swap drop wordlist swap set-order
ok order
Address exception
In the following example get-order
should only return 3 items instead of 10:
shell> cforth
C Forth Copyright (c) 2008 FirmWorks
ok order
context: forth forth root current: forth
ok get-order .s
7f47271ff6f0 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f8010 7f47271f86e0 7f47271f86e0 10
ok