![]() ![]() | ![]() |
File: [local] / OpenXM / src / k097 / try / t0.cc (download)
Revision 1.1.1.1 (vendor branch), Fri Oct 8 02:12:15 1999 UTC (24 years, 10 months ago) by maekawa
o import OpenXM sources |
#include <iostream.h> #include <stdio.h> extern "C" { void GC_init(void); void KSstart(void); int KSexecuteString(char *s); char *KSstringPop(void); } main() { char a[256]; char *s; int result; GC_init(); KSstart(); while (1) { cout << "\n\n?"; cin.getline(a,256); result = KSexecuteString(a); if (result != -1) { // If an error did not occured, pop the top // element from the stack of kan/sm1 KSexecuteString(" toString "); s = KSstringPop(); if (s != (char *)NULL) { cout << s << "\n"; } } } }