Typed file functions ?_(re)

Tue, 12 Aug 1997 11:22:24 +0200 (MEST)


Hello!

(* I am in hurry ... just some short notes ... *)

According to JoÒo Miguel Domingos:
> [...]
> I'm defining the record variable this way:
> 
>  r1 : tf1
> 
> and the file variable like this:
> 
>  f1 : file of tf1;
> 
> Is this correct ???

Yes.  Maybe it is necessary to write `file [ 1..1000 ] of tf1;'.

> I want to assign, reset, read and seek the file to
> read records in a sequencial way or just read one in position "x".I have
> downloaded the Peter's G. system.pas unit that have the bin* functions,
> but I don't know how to use them.

These are not written by me, but by The African Chief, and they are
designed to work with "untyped" files, AFAIK.

For what you have in mind, use the `Assign' procedure from the `System'
Unit.  Maybe you need to replace the untyped `Var' parameter with
`Var foo: tf1File' (with tf1File being `bindable file [ 1..1000 ] of tf1;')
and so on.

> Do you have any other functions to
> work with this type of files ???

`SeekRead', `SeekWrite', `SeekUpdate'.

> Please help me with this problem. My boss is geting very bored with me
> !!!

Good luck!

(* I am back in ~2 hours ... *)

Hope this helps,

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.NO-SPAM-PLEASE.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es