[fpc-pascal] Error runtime 102

Michael Van Canneyt michael at freepascal.org
Tue Mar 7 17:00:00 CET 2006



On Tue, 7 Mar 2006, Janie Gan wrote:

> Hi,
>
> I've been working on a program and each time i run it, it comes up wiht an 
> error runtime 102. I know it might have something to do with Assign, Amend 
> etc functions but can't figure out exactly where i went wrong. Here's an 
> example script.
>
> Begin
> Assign(oldd,'DDNAMEold.txt');
> reset(oldd);
> REPEAT read (oldd,ystart,yddstart,P);
> UNTIL eof(oldd);

Try this:

  While not eof(oldd) do
    readln(oldd,ystart,yddstart,P);

Otherwise the program will not jump to the next line.

Also, you should check the variables: you can't read separate
strings like this, only numbers.

Michael.



More information about the fpc-pascal mailing list