Restivo%SU-SCORE@sri-unix.UUCP (11/06/83)
From: Chuck Restivo <Restivo@SU-SCORE> Read_Sent.Pl and Ask.Pl have been added to the utility library at {SU-SCORE} on PS:<Prolog> . For those readers who have read only access to the network, I have a limited number of hard copies that could be mailed. -- ed Abstract for Read_Sent.Pl % Author : R.A.O'Keefe % Updated: 29 October 83 % Purpose: to provide a flexible input facility % Needs : memberchk from utils. /* read_until(Delimiters, Answer) reads characters from the current input until a character in the Delimiters string is read. The characters are accumulated in the Answer string, and include the closing delimiter. Prolog returns end-of-file as ^Z (26) regardless of the user's assignment (E.g. if you use ^D as end of file, Prolog still returns ^Z). The end of the file is always a delimiter. */ Abstract for Ask.Pl % Author : R.A.O'Keefe % Updated: Thursday November 3rd, 1983, 0:26:26 am % Purpose: ask questions that have a one-character answer. /* ask(Question, Answer) displays the Question on the terminal and reads a one-character answer from the terminal. But because you normally have to type "X <CR>" to get the computer to attend to you, it skips to the end of the line. All the juggling with see and tell is to make sure that i/o is done to the terminal even if your program is doing something else. The character returned will have Ascii code in the range 33..126 (that is, it won't be a space or a control character). */