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

\ test DEFER and friends

\ This file is in the public domain. NO WARRANTY.

require tester.fs

{ defer defer1 -> }
{ : is-defer1 is defer1 ; -> }
{ : action-defer1 action-of defer1 ; -> }
{ ' * ' defer1 defer! -> }
{ 2 3 defer1 -> 6 }
{ ' defer1 defer@ -> ' * }
{ action-of defer1 -> ' * }
{ action-defer1 -> ' * }
{ ' + is defer1 -> }
{ 1 2 defer1 -> 3 }
{ ' defer1 defer@ -> ' + }
{ action-of defer1 -> ' + }
{ action-defer1 -> ' + }
{ ' - is-defer1 -> }
{ 1 2 defer1 -> -1 }
{ ' defer1 defer@ -> ' - }
{ action-of defer1 -> ' - }
{ action-defer1 -> ' - }

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