File: BasicCont.fth

package info (click to toggle)
fcode-utils 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,768 kB
  • sloc: ansic: 9,717; csh: 241; makefile: 129; sh: 17
file content (48 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (20)
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
\  Test Basic Control Constructs
\  Updated Mon, 02 May 2005 at 15:39 by David L. Paktor


fcode-version2

headers

: mishka
    ." begin" begin
        ." -1 if" -1 if
	exit
	." else" else  0 drop
	." then" then
    ." again" again
    ." Donshka vith Mishka"
;

: moose
    ." begin" begin
         ." 0 while" 0 while
    ." repeat" repeat
    ." Done Vith Moose."
;

: minski
    ." 1 0 do"  1 0 do
        ." i drop" i drop
	." Please leave" leave
    ." loop" loop
   ." Donesky vith Minski"
;

: goofsky
    ." 0 case" 0 case
      ." 1 of"
      1 of   ." 1 endof"  1 endof
      ." 2 of"
      2 of   ." 2 endof"  2 endof
      ." 3 of"
      3 of   ." 3 endof"  3 endof
      ." default 0"  0
   ." endcase"
   endcase
   ." Donesky vith goofsky."
;

fcode-end