📄 miscfun.c
字号:
/*=====================================================*/ /* Otherwise, generate an error since the only allowed */ /* arguments are "on" or "off." */ /*=====================================================*/ else { ExpectedTypeError1("conserve-mem",1,"symbol with value on or off"); return; } return; }#if DEBUGGING_FUNCTIONS/****************************************//* MemUsedCommand: CLIPS access routine *//* for the mem-used command. *//****************************************/globle long int MemUsedCommand() { /*=============================================*/ /* The mem-used function accepts no arguments. */ /*=============================================*/ if (ArgCountCheck("mem-used",EXACTLY,0) == -1) return(0); /*=====================================================*/ /* Return the amount of memory currently held by CLIPS */ /* (both for current use and for later use). */ /*=====================================================*/ return(MemUsed()); }/********************************************//* MemRequestsCommand: CLIPS access routine *//* for the mem-requests command. *//********************************************/globle long int MemRequestsCommand() { /*=================================================*/ /* The mem-requests function accepts no arguments. */ /*=================================================*/ if (ArgCountCheck("mem-requests",EXACTLY,0) == -1) return(0); /*==================================*/ /* Return the number of outstanding */ /* memory requests made by CLIPS. */ /*==================================*/ return(MemRequests()); }#endif/****************************************//* AproposCommand: CLIPS access routine *//* for the apropos command. *//****************************************/globle VOID AproposCommand() { char *argument; DATA_OBJECT argPtr; struct symbolHashNode *hashPtr = NULL; int theLength; /*=======================================================*/ /* The apropos command expects a single symbol argument. */ /*=======================================================*/ if (ArgCountCheck("apropos",EXACTLY,1) == -1) return; if (ArgTypeCheck("apropos",1,SYMBOL,&argPtr) == CLIPS_FALSE) return; /*=======================================*/ /* Determine the length of the argument. */ /*=======================================*/ argument = DOToString(argPtr); theLength = strlen(argument); /*====================================================================*/ /* Print each entry in the symbol table that contains the argument as */ /* a substring. When using a non-ANSI compiler, only those strings */ /* that contain the substring starting at the beginning of the string */ /* are printed. */ /*====================================================================*/ while ((hashPtr = GetNextSymbolMatch(argument,theLength,hashPtr,CLIPS_TRUE,NULL)) != NULL) { PrintCLIPS(WDISPLAY,ValueToString(hashPtr)); PrintCLIPS(WDISPLAY,"\n"); } } /****************************************//* OptionsCommand: CLIPS access routine *//* for the options command. *//****************************************/globle VOID OptionsCommand() { /*===========================================*/ /* The options command accepts no arguments. */ /*===========================================*/ if (ArgCountCheck("options",EXACTLY,0) == -1) return; /*===========================================*/ /* Print the state of the compiler flags for */ /* this CLIPS executable. */ /*===========================================*/ PrintCLIPS(WDISPLAY,"Machine type: ");#if GENERIC PrintCLIPS(WDISPLAY,"Generic ");#endif#if VAX_VMS PrintCLIPS(WDISPLAY,"VAX VMS ");#endif#if UNIX_V PrintCLIPS(WDISPLAY,"UNIX System V or 4.2BSD ");#endif#if UNIX_7 PrintCLIPS(WDISPLAY,"UNIX System III Version 7 or Sun Unix ");#endif#if MAC_SC6 PrintCLIPS(WDISPLAY,"Apple Macintosh with Symantec C 6.0");#endif#if MAC_SC7 PrintCLIPS(WDISPLAY,"Apple Macintosh with Symantec C 7.0");#endif#if MAC_SC8 PrintCLIPS(WDISPLAY,"Apple Macintosh with Symantec C 8.0");#endif#if MAC_MPW PrintCLIPS(WDISPLAY,"Apple Macintosh with MPW C");#endif#if MAC_MCW PrintCLIPS(WDISPLAY,"Apple Macintosh with CodeWarrior");#endif#if IBM_MSC PrintCLIPS(WDISPLAY,"IBM PC with Microsoft C");#endif#if IBM_ZTC PrintCLIPS(WDISPLAY,"IBM PC with Zortech C");#endif#if IBM_SC PrintCLIPS(WDISPLAY,"IBM PC with Symantec C++");#endif#if IBM_ICB PrintCLIPS(WDISPLAY,"IBM PC with Intel C Code Builder");#endif#if IBM_TBC PrintCLIPS(WDISPLAY,"IBM PC with Turbo C");#endif#if IBM && WIN_32 PrintCLIPS(WDISPLAY," using Win32");#endifPrintCLIPS(WDISPLAY,"\n");PrintCLIPS(WDISPLAY,"ANSI Compiler is ");#if ANSI_COMPILER PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY,"Defrule construct is ");#if DEFRULE_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#if DEFRULE_CONSTRUCTPrintCLIPS(WDISPLAY," Conflict resolution strategies are ");#if CONFLICT_RESOLUTION_STRATEGIES PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Dynamic salience is ");#if DYNAMIC_SALIENCE PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Incremental reset is ");#if INCREMENTAL_RESET PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Logical dependencies (truth maintenance) are ");#if LOGICAL_DEPENDENCIES PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#endifPrintCLIPS(WDISPLAY,"Defmodule construct is ");#if DEFMODULE_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY,"Deftemplate construct is ");#if DEFTEMPLATE_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#if DEFTEMPLATE_CONSTRUCTPrintCLIPS(WDISPLAY," Deffacts construct is ");#if DEFFACTS_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#endifPrintCLIPS(WDISPLAY,"Defglobal construct is ");#if DEFGLOBAL_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY,"Deffunction construct is ");#if DEFFUNCTION_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY,"Defgeneric/Defmethod constructs are ");#if DEFGENERIC_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#if DEFGENERIC_CONSTRUCTPrintCLIPS(WDISPLAY," Imperative methods are ");#if IMPERATIVE_METHODS PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#endifPrintCLIPS(WDISPLAY,"Object System is ");#if OBJECT_SYSTEM PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#if OBJECT_SYSTEMPrintCLIPS(WDISPLAY," Definstances construct is ");#if DEFINSTANCES_CONSTRUCT PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Imperative (around/shadowed) message-handlers are ");#if IMPERATIVE_MESSAGE_HANDLERS PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Auxiliary (before/after) message-handlers are ");#if AUXILIARY_MESSAGE_HANDLERS PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Instance-set queries are ");#if INSTANCE_SET_QUERIES PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Direct pattern-matching on instances is ");#if INSTANCE_PATTERN_MATCHING PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Binary loading of instances is ");#if BLOAD_INSTANCES PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY," Binary saving of instances is ");#if BSAVE_INSTANCES PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif#endifPrintCLIPS(WDISPLAY,"Extended math package is ");#if EX_MATH PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY,"Text processing package is ");#if CLP_TEXTPRO PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endifPrintCLIPS(WDISPLAY,"Help system is ");#if CLP_HELP PrintCLIPS(WDISPLAY,"ON\n");#else PrintCLIPS(WDISPLAY,"OFF\n");#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -