[Up] [Contents] [Index] [Summary]

5.6.13 Querying Prolog

C_type PL_query(int)
Obtain status information on the Prolog system. The actual argument type depends on the information required. int describes what information is wanted. The options are given in table 7.

PL_QUERY_ARGCReturn an integer holding the number of arguments given to Prolog from Unix.
PL_QUERY_ARGVReturn a char ** holding the argument vector given to Prolog from Unix.
PL_QUERY_SYMBOLFILEReturn a char * holding the current symbol file of the running process.
PL_QUERY_ORGSYMBOLFILEReturn the initial symbol file (before loading) of Prolog. By setting the symbol file to this value no name clashes can occur with previously loaded foreign files (but no symbols can be shared with earlier loaded modules as well).
PL_MAX_INTEGERReturn a long, representing the maximal integer value represented by Prolog's tagged integers.
PL_MIN_INTEGERReturn a long, represented the minimal integer value.
PL_QUERY_VERSIONReturn a long, representing the version as 10,000 × M + 100 × m + p, where Mis the major,mthe minor version number andpthe patch-level. For example, 20717means2.7.17.

Table 7 : PL_query() options