git @ Cat's Eye Technologies Wanda / dc4be86
Fix example programs. Chris Pressey 6 years ago
3 changed file(s) with 13 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 : 0 fact -> 1 ;
1 : fact -> dup 1 - fact * ;
2 $ 5 fact
0 $
1 : 0 $ fact -> $ 1 ;
2 : $ fact -> $ dup 1 - fact * ;
3 5 fact
0 : mod5 -> 5 - dup sgn cont5 ;
1 : 1 cont5 -> mod5 ;
2 : 0 cont5 -> pop 0 ;
3 : -1 cont5 -> 5 + ;
4
5 $ 27 mod5 30 mod5 31 mod5
0 $
1 : $ mod5 -> $ 5 - dup sgn cont5 ;
2 : 1 $ cont5 -> $ mod5 ;
3 : 0 $ cont5 -> $ pop 0 ;
4 : -1 $ cont5 -> $ 5 + ;
5 27 mod5 30 mod5 31 mod5
0 : perim -> + 2 * ;
1 $ 4 10 perim
0 $
1 : $ perim -> $ + 2 * ;
2 4 10 perim