Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > d1f06a5336fd6bf4a381b72b8d2b5ce1 > files > 180

gprolog-1.2.16-3mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.06-7 of 2001-11-14">
<TITLE>
 Prolog state
</TITLE>
</HEAD>
<BODY TEXT=black BGCOLOR=white>
<A HREF="manual044.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual023.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="manual046.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>
<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#66dbff"><DIV ALIGN=center><TABLE>
<TR><TD><FONT SIZE=4><B><A NAME="htoc221">7.22</A></B></FONT></TD>
<TD WIDTH="100%" ALIGN=center><FONT SIZE=4><B>Prolog state</B></FONT></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE><UL>
<LI><A HREF="manual045.html#toc178"> <TT>set_prolog_flag/2</TT></A>
<LI><A HREF="manual045.html#toc179"> <TT>current_prolog_flag/2</TT></A>
<LI><A HREF="manual045.html#toc180"> <TT>set_bip_name/2</TT></A>
<LI><A HREF="manual045.html#toc181"> <TT>current_bip_name/2</TT></A>
<LI><A HREF="manual045.html#toc182"> <TT>write_pl_state_file/1</TT>,
 <TT>read_pl_state_file/1</TT></A>
</UL>
 <BR>
<A NAME="toc178"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE>
<TR><TD><B><A NAME="htoc222">7.22.1</A></B></TD>
<TD WIDTH="100%" ALIGN=center><TT><B>set_prolog_flag/2</B></TT></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE>
<A NAME="set-prolog-flag/2"></A>
 <BR>
<B>Templates</B>
<DL COMPACT=compact><DT><DD><TT>
set_prolog_flag(+flag, +term)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>set_prolog_flag(Flag, Value)</TT> sets the value
of the Prolog flag <TT>Flag</TT> to <TT>Value</TT>.<BR>
<BR>

<B>Prolog flags</B>: a Prolog flag is an atom
which is associated with a value that is either implementation defined
or defined by the user. Each flag has a permitted range of values; any
other value is a <TT>domain_error</TT>. The following two tables
present available flags, the possible values, a description and if
they are ISO or an extension. The first table presents unchangeable
flags while the second one the changeable flags. For flags whose
default values is machine independent, this value is
<U>underlined</U>.<BR>
<BR>
<B>Unchangeable flags</B>:<BR>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>Flag</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Values</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>Description</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>ISO</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>bounded</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center><U><TT>true</TT></U> / <TT>false</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>are integers
bounded ?</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>max_integer</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>greatest integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>min_integer</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>smallest integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>integer_rounding_function</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center><TT>toward_zero</TT>
<BR>
<TT>down</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT><I>rnd</I>(X)</TT> = integer part of <TT>X</TT>
 <BR>
<TT><I>rnd</I>(X)</TT> = lfloor<TT>Xrfloor</TT>
 (section&nbsp;<A HREF="manual029.html#Evaluation-of-an-arithmetic-expression">7.6.1</A>)</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>max_arity</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>maximum arity for compound terms (255)</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>max_atom</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>maximum number of atoms</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>max_unget</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an integer</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>maximum number of successive ungets</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>prolog_name</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an atom</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>name of the Prolog system</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>prolog_version</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an atom</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>version number of the Prolog system</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>prolog_date</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an atom</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>date of the Prolog system</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>prolog_copyright</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>an atom</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>copyright message of the Prolog
system</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR></TABLE><BR>
<B>Changeable flags</B>:<BR>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>Flag</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Values</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>Description</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>ISO</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>char_conversion</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center><TT>on</TT> / <U><TT>off</TT></U></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>is
character conversion activated ?</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>debug</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center><TT>on</TT> / <U><TT>off</TT></U></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>is the debugger
activated ?</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>singleton_warning</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center><U><TT>on</TT></U> / <TT>off</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>warn
about named singleton variables ?</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left><TT>strict_iso</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center><U><TT>on</TT></U> / <TT>off</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>strict ISO
behavior ?</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>&nbsp;
<BR>
<TT>double_quotes</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
<TT>atom</TT>
<BR>
<TT>chars</TT>
<BR>
<U><TT>codes</TT></U>
<BR>
<TT>atom_no_escape</TT>
<BR>
<TT>chars_no_escape</TT>
<BR>
<TT>codes_no_escape</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>a double quoted constant is returned as:
<BR>
an atom
<BR>
a list of characters
<BR>
a list of character codes
<BR>
as <TT>atom</TT> but ignore escape sequences
<BR>
as <TT>chars</TT> but ignore escape sequences
<BR>
as <TT>code</TT> but ignore escape sequences</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
Y
<BR>
&nbsp;
<BR>
&nbsp;
<BR>
N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>&nbsp;
<BR>
<TT>back_quotes</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
<TT>atom</TT>
<BR>
<TT>chars</TT>
<BR>
<TT>codes</TT>
<BR>
<U><TT>atom_no_escape</TT></U>
<BR>
<TT>chars_no_escape</TT>
<BR>
<TT>codes_no_escape</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>a back quoted constant is returned as:
<BR>
an atom
<BR>
a list of characters
<BR>
a list of character codes
<BR>
as <TT>atom</TT> but ignore escape sequences
<BR>
as <TT>chars</TT> but ignore escape sequences
<BR>
as <TT>code</TT> but ignore escape sequences</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>&nbsp;
<BR>
<TT>unknown</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
<U><TT>error</TT></U>
<BR>
<TT>warning</TT>
<BR>
<TT>fail</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>a predicate calls an unknown procedure:
<BR>
an <TT>existence_error</TT> is raised
<BR>
a message is displayed then fails
<BR>
quietly fails</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
Y</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>&nbsp;
<BR>
<TT>syntax_error</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
<U><TT>error</TT></U>
<BR>
<TT>warning</TT>
<BR>
<TT>fail</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>a predicate causes a syntax error:
<BR>
a <TT>syntax_error</TT> is raised
<BR>
a message is displayed then fails
<BR>
quietly fails</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
N</DIV></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><DIV ALIGN=left>&nbsp;
<BR>
<TT>os_error</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
<U><TT>error</TT></U>
<BR>
<TT>warning</TT>
<BR>
<TT>fail</TT></DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=left>a predicate causes an O.S. error:
<BR>
a <TT>system_error</TT> is raised
<BR>
a message is displayed then fails
<BR>
quietly fails</DIV></TD>
<TD VALIGN=top ALIGN=left><DIV ALIGN=center>&nbsp;
<BR>
N</DIV></TD>
</TR></TABLE><BR>
The <TT>strict_iso</TT> flag is introduced to allow a compatibility with
other Prolog systems. When turned off the following relaxations apply:
<UL><LI>a callable term can be given as a predicate indicator.<BR>
<BR>
<LI>built-in predicates are found by <TT>current_predicate/1</TT>
(section&nbsp;<A HREF="manual031.html#current-predicate/1">7.8.1</A>).</UL>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Flag</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Value</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Flag</TT> is neither a variable nor an atom</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(atom, Flag)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Flag</TT> is an atom but not a valid flag</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>domain_error(prolog_flag, Flag)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Value</TT> is inappropriate for Flag</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>domain_error(flag_value, Flag+Value)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Value</TT> is appropriate for <TT>Flag</TT> but flag
<TT>Flag</TT> is not modifiable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>permission_error(modify, flag, Flag)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
ISO predicate. All ISO flags are implemented.<BR>
<BR>
<A NAME="toc179"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE>
<TR><TD><B><A NAME="htoc223">7.22.2</A></B></TD>
<TD WIDTH="100%" ALIGN=center><TT><B>current_prolog_flag/2</B></TT></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE>
 <BR>
<B>Templates</B>
<DL COMPACT=compact><DT><DD><TT>
current_prolog_flag(?flag, ?term)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>current_prolog_flag(Flag, Value)</TT>
succeeds if there exists a Prolog flag that unifies with
<TT>Flag</TT> and whose value unifies with <TT>Value</TT>. This predicate
is re-executable on backtracking.<BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Flag</TT> is neither a variable nor an atom</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(atom, Flag)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Flag</TT> is an atom but not a valid flag</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>domain_error(prolog_flag, Flag)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
ISO predicate.<BR>
<BR>
<A NAME="toc180"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE>
<TR><TD><B><A NAME="htoc224">7.22.3</A></B></TD>
<TD WIDTH="100%" ALIGN=center><TT><B>set_bip_name/2</B></TT></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE>
<A NAME="set-bip-name/2"></A>
 <BR>
<B>Templates</B>
<DL COMPACT=compact><DT><DD><TT>
set_bip_name(+atom, +arity)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>set_bip_name(Functor, Arity)</TT> initializes the context of the error
(section&nbsp;<A HREF="manual019.html#General-format-and-error-context">5.3.1</A>) with <TT>Functor</TT> and
<TT>Arity</TT> (if <TT>Arity</TT> &lt; 0 only <TT>Functor</TT> is
significant).<BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Functor</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Arity</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Functor</TT> is neither a variable nor an atom</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(atom, Functor)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Arity</TT> is neither a variable nor an integer</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(integer, Arity)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
GNU Prolog predicate.<BR>
<BR>
<A NAME="toc181"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE>
<TR><TD><B><A NAME="htoc225">7.22.4</A></B></TD>
<TD WIDTH="100%" ALIGN=center><TT><B>current_bip_name/2</B></TT></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE>
<A NAME="current-bip-name/2"></A>
 <BR>
<B>Templates</B>
<DL COMPACT=compact><DT><DD><TT>
current_bip_name(?atom, ?arity)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>current_bip_name(Functor, Arity)</TT> succeeds if <TT>Functor</TT> and
<TT>Arity</TT> correspond to the context of the error (section&nbsp;<A HREF="manual019.html#General-format-and-error-context">5.3.1</A>) (if <TT>Arity</TT> &lt; 0 only <TT>Functor</TT> is
significant).<BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Functor</TT> is neither a variable nor an atom</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(atom, Functor)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Arity</TT> is neither a variable nor an integer</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(integer, Arity)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
GNU Prolog predicate.<BR>
<BR>
<A NAME="toc182"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
<TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE>
<TR><TD><B><A NAME="htoc226">7.22.5</A></B></TD>
<TD WIDTH="100%" ALIGN=center><B><TT>write_pl_state_file/1</TT>,
 <TT>read_pl_state_file/1</TT></B></TD>
</TR></TABLE></DIV></TD>
</TR></TABLE>
<A NAME="write-pl-state-file/1"></A>
 
 <BR>
<B>Templates</B>
<DL COMPACT=compact><DT><DD><TT>
write_pl_state_file(+source_sink)<BR>
read_pl_state_file(+source_sink)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>write_pl_state_file(FileName)</TT> writes onto <TT>FileName</TT> all
information that influences the parsing of a term (section&nbsp;<A HREF="manual037.html#Term-input/output">7.14</A>). This allows a sub-process written in Prolog to read this
file and then process any Prolog term as done by the parent process. This
file can also be passed as argument of the <TT>--pl-state</TT> option when
invoking <TT>gplc</TT> (section&nbsp;<A HREF="manual008.html#Using-the-compiler">3.4.3</A>). More precisely the
following elements are saved:
<UL><LI>all operator definitions (section&nbsp;<A HREF="manual037.html#op/3:(Term-input/output)">7.14.10</A>).<BR>
<BR>
<LI>the character conversion table (section&nbsp;<A HREF="manual037.html#char-conversion/2">7.14.12</A>).<BR>
<BR>
<LI>the value of <TT>char_conversion</TT>, <TT>double_quotes</TT>, <TT>back_quotes</TT> and <TT>singleton_warning</TT> Prolog flags
(section&nbsp;<A HREF="#set-prolog-flag/2">7.22.1</A>).</UL>
<TT>read_pl_state_file(FileName)</TT> reads (restores) from
<TT>FileName</TT> all information previously saved by
<TT>write_pl_state_file/1.</TT><BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>FileName</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>FileName</TT> is neither a variable nor an atom</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(atom, FileName)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left>an operating system error occurs and the value of the
<TT>os_error</TT> Prolog flag is <TT>error</TT>
(section&nbsp;<A HREF="#set-prolog-flag/2">7.22.1</A>)</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>system_error(<I>atom explaining the error</I>)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
GNU Prolog predicate.<BR>
<BR>

<HR SIZE=2>
Copyright (C) 1999-2002 Daniel Diaz
<BR>
<BR>
Verbatim copying and distribution of this entire article is permitted in any
medium, provided this notice is preserved. <BR>
<BR>
<A HREF="index.html#copyright">More about the copyright</A>
<HR>
<A HREF="manual044.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual023.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="manual046.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>