Class GetChar
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.io.GetChar
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory
get_char(X) - reads the next character from the input stream.
The goal succeeds if X can be unified with next character read from the current input stream. Succeeds
only once and the operation of moving to the next character is not undone on backtracking.
If there are no more characters to read from the current input stream (i.e. if the end of the stream has been
reached) then an attempt is made to unify X with an atom with the value end_of_file.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PredicateFactory
isAlwaysCutOnBacktrack, preprocess
-
Constructor Details
-
GetChar
public GetChar()
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-