Multidimensional conformant arrays
I think I found a bug with conformant arrays. Are conformant arrays supposed to work in multiple dimensions at all? If so, the following program gives the wrong result "3 2 1 2" instead of "1 2 3 4"; if not, it doesn't generate a necessary error message... program x; procedure p(var a:array[b..c:integer;d..e:integer] of integer); begin writeln(b,' ',c,' ',d,' ',e) end; var a:array[1..2,3..4] of integer; begin p(a) end. The corresponding program using a schema type works. BTW: Wouldn't it seem reasonable to allow the "with" statement also for schema types, as in the following example: program x; type t(a:integer)=array[1..a] of integer; procedure p(var v:t); begin with v do writeln(a) end; begin end. And one little detail: The next program gives the error message x.p:6: request for member `X' in something not x.p:6: a record, schema or object which is not completely correct since v is a schema, but x is not a field of v. program x; type t(a:integer)=array[1..a] of integer; procedure p(var v:t); begin writeln(v.x) end; begin end. Greetings, Frank -- Frank Heckenbach, Erlangen, Germany heckenb@mi.uni-erlangen.de http://home.pages.de/~fjf/links.htm
participants (1)
-
Frank Heckenbach