Annotation of OpenXM/src/k097/try/t0.cc, Revision 1.1.1.1
1.1 maekawa 1:
2: #include <iostream.h>
3: #include <stdio.h>
4:
5: extern "C" {
6: void GC_init(void);
7: void KSstart(void);
8: int KSexecuteString(char *s);
9: char *KSstringPop(void);
10: }
11:
12: main() {
13: char a[256];
14: char *s;
15: int result;
16: GC_init();
17: KSstart();
18:
19: while (1) {
20: cout << "\n\n?";
21: cin.getline(a,256);
22: result = KSexecuteString(a);
23: if (result != -1) {
24: // If an error did not occured, pop the top
25: // element from the stack of kan/sm1
26: KSexecuteString(" toString ");
27: s = KSstringPop();
28: if (s != (char *)NULL) {
29: cout << s << "\n";
30: }
31: }
32: }
33: }
34:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>