sitelogo
IF/Prolog‚ΜƒƒCƒ“ƒ‹|ƒv‚ΜƒVƒ…ƒ~ƒŒ|ƒg
MINERVA superseeded IF/Prolog. Please see http://www.ifcomputer.co.jp/MINERVA for details.

We discontinued to sell IF/Prolog Dec 31. 2003. For current customers, we continue to provide professional support for IF/Prolog until Dec 31, 2008.

#include "cpro.h" #include

int main(argc, argv) int argc; char *argv[]; { char query[80]; QueryDescr *descr; int n;

INITProlog(argc,argv); printt("\nHELLO, WELCOME TO YOUR OWN PROLOG LOOP\n\n");

for( ; ; ) { printt("?- "); gets(query); ParseProlog(query,&descr);

if (descr->ret_code == -1) { printt("SYNTAX: %s : \n",descr->ret_msg); continue; } while (RunProlog(descr) == 1) { if (descr->no_vars == 0) printt(" yes\n"); for ( n=0; n < descr->no_vars; n++ ) { printt(" %s",descr->var[n].name); printt("\t=%q\n",*descr->var[n].loc.term); }

} printt("\n"); if (descr->ret_code == 0) printt(" fail\n"); else if (descr->ret_code == -2) printt("ERROR: %s\n",descr->ret_msg); else if (descr->ret_code == -3) { printt("EXIT: %s %d\n",descr->ret_msg,descr->exit_code); break; } } }


Darueber read on...
scroll to top managed with ubiCMS