14 Feb
2017
14 Feb
'17
1:06 p.m.
Hi, Does anyone know the syntax for initializing a dynamic array of more than one dimension? type {$ifdef __GPC__} tMSet (n:CWord) = Array [1..n, 1..n] Of double; {$else} tMSet = Array Of Array Of double; var MSet : tMSet; {$endif} pMSet : ^tMSet; ........ {$ifdef __GPC__} new (pMset, n, n); {$else} SetLength (Mset, n, n); pMSet := @Mset; {$endif} The above works in FPC, but fails in GPC on the "new" with "error: `New' applied to this schema requires 1 discriminant value" This general approach works fine for 1D arrays. Regards, Peter B
3467
Age (days ago)
3467
Last active (days ago)
3 comments
2 participants
participants (2)
-
Peter -
Waldek Hebisch