Read1
Implements ISO's read/1: parses the next term from the current input stream (see IOPrimitiveUtils.currentInputChannel) and unifies it with the argument. See IOPrimitiveUtils.readTermAndReply for the shared implementation and its exceptions.
Deviating from the ISO standard (which specifies unifying the argument with the atom end_of_file), this implementation instead fails once the stream is exhausted or has no term currently available.
?- read(Term).Content copied to clipboard