Commit | Line | Data |
---|---|---|
4abd73a6 VS |
1 | fun string READ(string input) |
2 | { | |
3 | return input; | |
4 | } | |
5 | ||
6 | fun string EVAL(string input) | |
7 | { | |
8 | return input; | |
9 | } | |
10 | ||
11 | fun string PRINT(string input) | |
12 | { | |
13 | return input; | |
14 | } | |
15 | ||
16 | fun string rep(string input) | |
17 | { | |
18 | return input => READ => EVAL => PRINT; | |
19 | } | |
20 | ||
21 | fun void main() | |
22 | { | |
23 | ConsoleInput stdin; | |
24 | string input; | |
25 | ||
26 | while( true ) | |
27 | { | |
28 | stdin.prompt("user>") => now; | |
29 | stdin.getLine() => input; | |
30 | chout <= rep(input) + "\n"; | |
31 | } | |
32 | } | |
33 | ||
34 | main(); |