Hi, Folks!
I am still working on this damned dyn-array problem.
For what reason is it that a construction of
type MaxFirmenGroesse = ^integer; type workers = array [1..MaxFirmenGroesse] of (anything)
does not work?
Can you please tell me how the correct form would look like? Where is my mistake?
-- Stefan Czinczoll scholle@uni-duisburg.de
Hi, Scholle(?)! Hi, all!
type MaxFirmenGroesse = ^integer; type workers = array [1..MaxFirmenGroesse] of (anything)
Nee, dat wird nix ... this cannot work.
`^integer' is a pointer type, not an integer value. As the upper index of an array whose lower index is `1', an integer value is required.
What you mean is something like the following:
type workers (MaxFirmenGroesse: integer) = array [1..MaxFirmenGroesse] of (anything)
var fleissig: workers (42); (* We know their number for sure --> static array. *) var faul: ^workers; (* This is a pointer to a dynamic array. *)
[...]
New ( faul, 137 ); faul^ [ 7 ]:= fleissig [ 13 ]; Dispose ( faul );
Happy hacking,
Peter