[comp.lang.pascal] Turbo Pascal: file input buffers

cs2531cd@charon.unm.edu (Steve Freed) (04/04/88)

I need a little help with Turbo Pascal dealing with files and the
input buffer (window, pointer, what ever you like to call it).

My documentation seems to neatly skip over this little gem, and I am
really perplexed on how to write the following "standard pascal"
code in Turbo:

var  number : integer;
     letter : char;

begin
   if inputfile^ in [0..9] then
     readln(inputfile, number)
   else
     read(inputfile,letter);
end


any help on this would be met with a very warm welcome.

   Many thanks in advance....

			Steve Freed
			cs2531cd@charon.unm.edu

R_Tim_Coslet@cup.portal.com (04/10/88)

Steve Freed   (cs2531cd@charon.unm.edu)  writes:
>I need a little help with Turbo Pascal dealing with files and the
>input buffer (window, pointer, what ever you like to call it).
>
>My documentation seems to neatly skip over this little gem, and I am

There is a very good reason why the Turbo Pascal Doc.s skip over this:
it is because Borland chose not to implement Standard Pascal I/O...

I do not consider Turbo Pascal to be "Real Pascal" for that reason.

The _ONLY_ I/O inplemented directly in Turbo Pascal is via the
READ(), READLN(), WRITE(), WRITELN() procedures.


I will probably get flamed by the Turbo Fanatics out there but this
is my opinion of Turbo. besides I tried to mail this and had it returned
for "host unknown".			R. Tim Coslet