[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'amigados' (#aros)


Makes a char available for reading again. (buffered)


Source position: amigados.pas line 2296

function UnGetC(

  File_: BPTR;

  Character: LongInt





Filehandle to use for buffered I/O



Character to push back or -1

Function result

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.

Documentation generated on: 2017-01-10