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
* a few simple examples of INPUT PROGRAM.
* Raynald Levesque 2004/03/20 rlevesque@videotron.ca.

* create list of 1 to 100.
INPUT PROGRAM.
LOOP id=1 TO 100.
-  END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
LIST.

* create 50 1's followed by 50 2's.
INPUT PROGRAM.
LOOP id=1 TO 2.
LEAVE id.
-  LOOP #cnt=1 TO 50.
-     END CASE.
-  END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM.
LIST.

* create 1,2,3,4,5 repeated 10 times.
INPUT PROGRAM.
LOOP #id=1 TO 10.
LEAVE #id.
-  LOOP val=1 TO 5.
-     END CASE.
-  END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM.
LIST.

* Generate 1000 random numbers of Uniform distribution.
INPUT PROGRAM.
LOOP #id=1 TO 1000.
- COMPUTE draw=UNIFORM(1).
- END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
LIST /CASES=FROM 1 TO 25.