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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to