Hash :
acf5213f
Author :
Date :
2006-10-14T20:31:53
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
\ testcase3.fth
\ Updated Wed 2 Mar 2005 at 09:54 by David L. Paktor
marker fuggedaboudit
: foobar ( n3 n2 n1 -- m1 )
{ _eenie _meany _miney ; _moe }
." Eenie = " _eenie . cr
." Meany = " _meany . cr
." Miney = " _miney . cr
_meany _miney + _eenie * -> _moe
" throw" confirmed? cr throw
." Moe = " _moe . cr
_moe
;
: goobar ( n3 n2 n1 -- m1 )
{ _eenie _meany _miney ; _moe }
." GEenie = " _eenie . cr
." GMeany = " _meany . cr
." GMiney = " _miney . cr
_meany 2* _eenie 2* _miney 2* foobar 10 + -> _moe
." GEenie = " _eenie . cr
." GMeany = " _meany . cr
." GMiney = " _miney . cr
." GMoe = " _moe . cr
_moe
;
: loobar ( n3 n2 n1 -- m1 )
{ _eenie _meany _miney ; _moe }
." LEenie = " _eenie . cr
." LMeany = " _meany . cr
." LMiney = " _miney . cr
_miney 2* _meany 2* _eenie 2* goobar 10 + -> _moe
." LEenie = " _eenie . cr
." LMeany = " _meany . cr
." LMiney = " _miney . cr
." LMoe = " _moe . cr
_moe
;
: hoobar ( n3 n2 n1 -- m1 )
{ _eenie _meany _miney ; _moe }
." HEenie = " _eenie . cr
." HMeany = " _meany . cr
." HMiney = " _miney . cr
_eenie 2* _miney 2* _meany 2* loobar 10 + -> _moe
." HEenie = " _eenie . cr
." HMeany = " _meany . cr
." HMiney = " _miney . cr
." HMoe = " _moe . cr
_moe
;
: poobar ( n3 n2 n1 -- m1 )
{ _eenie _meany _miney ; _moe }
." PEenie = " _eenie . cr
." PMeany = " _meany . cr
." PMiney = " _miney . cr
_miney 2* _meany 2* _eenie 2*
['] hoobar catch if
." Caught" 3drop false
else 10 + -> _moe true
then cr
." PEenie = " _eenie . cr
." PMeany = " _meany . cr
." PMiney = " _miney . cr
if
." PMoe = " _moe . cr _moe
else 0
then cr
;
: ordinary ( -- )
123 456 789 poobar
.s cr
;