/usr/share/doc/gprolog-doc/gprolog.html/gprolog046.html is in gprolog-doc 1.3.0-6.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | <!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=US-ASCII">
<META name="GENERATOR" content="hevea 1.10">
<LINK rel="stylesheet" type="text/css" href="gprolog.css">
<TITLE>Program state</TITLE>
</HEAD>
<BODY TEXT=black BGCOLOR=white>
<A HREF="gprolog045.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="gprolog023.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="gprolog047.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
<HR>
<H3 CLASS="subsection"><A NAME="htoc227">7.23</A>  Program state</H3><UL>
<LI><A HREF="gprolog046.html#toc183"><TT>consult/1</TT>,
<TT>’.’/2</TT> - program consult</A>
</LI><LI><A HREF="gprolog046.html#toc184"><TT>load/1</TT></A>
</LI><LI><A HREF="gprolog046.html#toc185"><TT>listing/1</TT>,
<TT>listing/0</TT></A>
</LI></UL>
<H4 CLASS="subsubsection"><A NAME="toc183"></A><A NAME="htoc228">7.23.1</A>  <TT>consult/1</TT>,
<TT>’.’/2</TT> - program consult</H4><P>
<A NAME="consult/1"></A>
</P><P><B>Templates</B></P><DL CLASS="list"><DT CLASS="dt-list">
</DT><DD CLASS="dd-list"><TT>
consult(+atom_or_atom_list)<BR>
’.’(+atom, +atom_list)</TT></DD></DL><P><B>Description</B></P><P><TT>consult(Files)</TT> compiles and loads into memory each file
of the list <TT>Files</TT>. Each file is compiled for byte-code using the
GNU Prolog compiler (section <A HREF="gprolog008.html#The-GNU-Prolog-compiler">3.4</A>) then loaded using
<TT>load/1</TT> (section <A HREF="#load/1">7.23.2</A>). It is possible to specify <TT>user</TT> as a
file name to directly enter the program from the terminal. <TT>Files</TT> can
be also a single file name (i.e. an atom). Refer to the section concerning
the consult of a Prolog program for more information
(section <A HREF="gprolog006.html#Consulting-a-Prolog-program">3.2.3</A>).</P><P>The final file name of a file is computed using the predicates
<TT>prolog_file_name/2</TT> (section <A HREF="gprolog049.html#prolog-file-name/2">7.26.3</A>) and
<TT>absolute_file_name/2</TT> (section <A HREF="gprolog049.html#absolute-file-name/2">7.26.1</A>).</P><P><TT>[ File | Files ]</TT>, i.e. <TT>’.’(File, Files)</TT> is
equivalent to <TT>consult([ File | Files ])</TT>.</P><P><B>Errors</B></P><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
<TT>Files</TT> is a partial list or a list with an element
<TT>E</TT> which is a variable</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
<TT>Files</TT> is neither a partial list nor a list nor an atom</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>type_error(list, Files)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an element <TT>E</TT> of the <TT>Files</TT> list is neither a
variable nor an atom</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>type_error(atom, E)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an element <TT>E</TT> of the <TT>Files</TT> list is an atom but not
a valid pathname</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>domain_error(os_path, E)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an element <TT>E</TT> of the <TT>Files</TT> list is a valid
pathname but does not correspond to an existing source</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>existence_error(source_sink, E)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an error occurs executing a directive</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left>see <TT>call/1</TT> errors (section <A HREF="gprolog022.html#call/1">6.2.3</A>)</TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
</TABLE><P><B>Portability</B></P><P>GNU Prolog predicates.</P><H4 CLASS="subsubsection"><A NAME="toc184"></A><A NAME="htoc229">7.23.2</A>  <TT>load/1</TT></H4><P>
<A NAME="load/1"></A>
</P><P><B>Templates</B></P><DL CLASS="list"><DT CLASS="dt-list">
</DT><DD CLASS="dd-list"><TT>
load(+atom_or_atom_list)</TT></DD></DL><P><B>Description</B></P><P><TT>load(Files)</TT> loads into memory each file of the list
<TT>Files</TT>. Each file must have been previously compiled for byte-code
using the GNU Prolog compiler (section <A HREF="gprolog008.html#The-GNU-Prolog-compiler">3.4</A>).
<TT>Files</TT> can be also a single file name (i.e. an atom).</P><P>The final file name of a file is computed using the predicates
<TT>absolute_file_name/2</TT> (section <A HREF="gprolog049.html#absolute-file-name/2">7.26.1</A>). If no
suffix is given <TT>’.wbc’</TT> is appended to the file name.</P><P><B>Errors</B></P><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
<TT>Files</TT> is a partial list or a list with an element
<TT>E</TT> which is a variable</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
<TT>Files</TT> is neither a partial list nor a list nor an atom</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>type_error(list, Files)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an element <TT>E</TT> of the <TT>Files</TT> list is neither a
variable nor an atom</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>type_error(atom, E)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an element <TT>E</TT> of the <TT>Files</TT> list is an atom but not
a valid pathname</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>domain_error(os_path, E)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an element <TT>E</TT> of the <TT>Files</TT> list is a valid
pathname but does not correspond to an existing source</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>existence_error(source_sink, E)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
an error occurs executing a directive</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left>see <TT>call/1</TT> errors (section <A HREF="gprolog022.html#call/1">6.2.3</A>)</TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
</TABLE><P><B>Portability</B></P><P>GNU Prolog predicate.</P><H4 CLASS="subsubsection"><A NAME="toc185"></A><A NAME="htoc230">7.23.3</A>  <TT>listing/1</TT>,
<TT>listing/0</TT></H4><P>
<A NAME="listing/1"></A>
</P><P><B>Templates</B></P><DL CLASS="list"><DT CLASS="dt-list">
</DT><DD CLASS="dd-list"><TT>
listing(+predicate_indicator)<BR>
listing(+atom)<BR>
listing</TT></DD></DL><P><B>Description</B></P><P><TT>listing(Pred)</TT> lists the clauses of the consulted predicate whose
predicate indicator is <TT>Pred</TT>. <TT>Pred</TT> can also be a single
atom in which case all predicates whose name is <TT>Pred</TT> are listed (of
any arity). This predicate uses <TT>portray_clause/2</TT>
(section <A HREF="gprolog037.html#portray-clause/2">7.14.8</A>) to output the clauses. </P><P><TT>listing</TT> lists all clauses of all consulted predicates.</P><P><B>Errors</B></P><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
<TT>Pred</TT> is a variable</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
<TR><TD VALIGN=top ALIGN=left>
<TT>Pred</TT> is neither a variable nor predicate indicator or an
atom</TD><TD VALIGN=top ALIGN=center NOWRAP>  </TD><TD VALIGN=top ALIGN=left><TT>type_error(predicate_indicator, Pred)</TT></TD></TR>
<TR><TD CLASS="hbar" COLSPAN=3></TD></TR>
</TABLE><P><B>Portability</B></P><P>GNU Prolog predicate.</P>
<HR SIZE=2>
Copyright (C) 1999-2007 Daniel Diaz
Verbatim copying and distribution of this entire article is permitted in any
medium, provided this notice is preserved. <A HREF="index.html#copyright">More about the copyright</A>
<HR>
<A HREF="gprolog045.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="gprolog023.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="gprolog047.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
|