1 / 6
Apr 2006

My old code in Pascal got Runtime Error ( NZEC ) in problem TTABLE !
I tried much time to find where is my mistake , but it's a bug of Pascal ! The new version of Free Pascal isn't really better , it still has many bugs confused
The administrators should take a look at this bug.
Here is my old code :

Type  Xau  =  String[5] ;
...
Var S1 , F1 : Xau ;
    ch  : char ;
    v    : longint ;
...
Readln( S1 , ch , F1 , v ) ;
....

And here is the accepted code :

Var  S1 , F1 : array[1..5] of char ;
     ch : char ;
     v   : longint ;
...
For i := 1 to 5 do read( S1[i] ) ;
read( ch ) ;
For i := 1 to 5 do read( F1[i] ) ;
readln( v ) ;
...
  • created

    Apr '06
  • last reply

    Jun '08
  • 5

    replies

  • 1.3k

    views

  • 3

    users

3 months later

I agree with you that the new version of Pascal has many bugs, but I don't think your trouble is really bug, it may be a new rule of FP, such as we have to insert a new line to input file. I think so.

I don't think so. It must have been FP's bug.
The Pascal compiler used in acm.timus.ru is FP 2.0.2 for Linux and it doesn't have this bug. I still can read string with limited or unlimited length ( ansi string ).
Are you student of Hanoi-Ams high school ?

Yes, I am a student of Hanoi - Amsterdam high school, as you were.
Maybe it's really FP's bug, I'm not sure. Why don't you ask FP's authors?

^^ no , I was student of SP high school .
I had told them about it and they said that they would fix it in the new version .

1 year later

troi oi , toÅ•n lÅ• cao thủ tiếng Anh hong Å•?!?!?!