Darwin Help

Back to Index

ReadRawLine

Function ReadRawLine - read a line as a string

Calling Sequence  ReadRawLine()
ReadRawLine(t)
Parameters
NameTypeDescription

t string a prompt string
Return Type  string
Synopsis Reads one line from the current input stream and returns it as a string. When the input file is exhausted, the next ReadRawLines will return the string EOF. The string t, if provided, is a prompt which is sent to the standard output directly before reading from the standard input. This statement should not be used in interactive mode or in the middle of a program which is being read from the input stream, as there is bound to be confusion between the program and the data. It is recommended to use it inside a function/procedure.
Examples
> OpenPipe(date);

> ReadRawLine();
Thu Oct 12 08:01:39 MET DST 2000
> ReadRawLine();
EOF
> x := proc() 
t := ReadRawLine('prompt: '); 
lprint('The user entered: ',t); 
end;

> x();
prompt: 1+3;
The user entered:  1+3;

See also FileStat,   inputoutput,   OpenPipe,   OpenReading,   ReadData,   ReadLine,   ReadOffsetLine,   ReadRawFile,   ReadURL,   SearchDelim,   SplitLines