Rudy Moddemeyer wrote:
There is a small bug in the implementation of array's. See the following example program:
PROGRAM test(input, output);
TYPE RealVectorT(b,e:integer) =ARRAY[b..e] OF Real; RealMatrixT(br,er,bc,ec:integer) =ARRAY[br..er] OF RealVectorT(bc,ec);
VAR x:RealMatrixT(1,5,1,5);
BEGIN x[1,1]:=0; { error: test.p: In function `pascal_main_program': test.p:10: subscripted object is not an array or string } x[1][1]:=0; { this is O.K. } END.
Both implementations of addressing an array element x[1,1] and x[1][1] should be equivalent. In the first case the compiler does not interpret x as an array. The latter version is correctly interpreted and executed.
Thanks for the report (rudy1.pas). The problematic code (gpc-typeck.c:2207) is marked `@@@' which might mean that it's a known problem to Peter... Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html