File:  [gforth] / gforth / test / deferred.fs
Revision 1.1: download - view: text, annotated - select for diffs
Sun Nov 28 20:20:38 2004 UTC (14 years, 11 months ago) by anton
Branches: MAIN
CVS tags: v0-7-0, HEAD
implemented deferred words proposal (and adapted documentation accordingly).

    1: \ test DEFER and friends
    2: 
    3: \ This file is in the public domain. NO WARRANTY.
    4: 
    5: require tester.fs
    6: 
    7: { defer defer1 -> }
    8: { : is-defer1 is defer1 ; -> }
    9: { : action-defer1 action-of defer1 ; -> }
   10: { ' * ' defer1 defer! -> }
   11: { 2 3 defer1 -> 6 }
   12: { ' defer1 defer@ -> ' * }
   13: { action-of defer1 -> ' * }
   14: { action-defer1 -> ' * }
   15: { ' + is defer1 -> }
   16: { 1 2 defer1 -> 3 }
   17: { ' defer1 defer@ -> ' + }
   18: { action-of defer1 -> ' + }
   19: { action-defer1 -> ' + }
   20: { ' - is-defer1 -> }
   21: { 1 2 defer1 -> -1 }
   22: { ' defer1 defer@ -> ' - }
   23: { action-of defer1 -> ' - }
   24: { action-defer1 -> ' - }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>