Enoch <[email protected]> writes:
> Matthias Trute <[email protected]> writes:
>> I just applied your patch with my modification for the
>> the stack effect of the scope word. My second remark
>> would not change that (user visible) interface so I think
>> we can now play with the idea and can clean up the
>> code behind the scenes with less pressure ;)
>
> Hello Matthias,
>
> Good, did svn update deciding conflicts in your favor :-)
>
> Regarding the behind the scenes cleanup, do you allow merging of
> XT_HEADER into XT_DOCREATE ?
>
> Regards, Enoch.
Hello again,
Below is an advanced example for (the revised) "wlscope" use. It shows
how to encapsulate a large library of words. Note that since the
following code allows multiple scope installs we can and perhaps should
make "current-scope" invisible.
Any comments?
Regards, Enoch.
----------------------------------------------------------------------
wordlist constant can_list
get-order can_list rot rot 1+ set-order
: scope ( c-addr len -- wid )
2dup
4 > if \ name length check
s" can_" tuck icompare if \ name prefix check
2drop can_list exit
then
else
drop
then
[ ' wlscope defer@ ] literal execute \ scope nesting safe
;
' scope is wlscope
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel