Makes a char available for reading again. (buffered)
Source position: amigados.pas line 1730
function UnGetC( |
fh: LongInt; |
character: LongInt |
):LongInt; |
character |
|
Character to push back or -1 |
Character pushed back, or False if the character cannot be pushed back.
Pushes the character specified back into the input buffer. Every time you use a buffered read routine, you can always push back 1 character. You may be able to push back more, though it is not recommended, since there is no guarantee on how many can be pushed back at a given moment.
Passing -1 for the character will cause the last character read to be pushed back. If the last character read was an EOF, the next character read will be an EOF.
Note: UnGetC can be used to make sure that a filehandle is set up as a read filehandle. This is only of importance if you are writing a shell, and must manipulate the filehandle's buffer.