its possible to make 2-dim. dynamic array?
d:array of array of integer;
how to set dimmenstions of array in script?
script: 2-dimensional dynamic array?
Hi,
Have you tried:
type X: array of integer ;
var Y: array of X;
var i: integer;
for i:= 0 to n do
begin
Y:=X;
end;
Hope it can help,
Regards,
B.
Have you tried:
type X: array of integer ;
var Y: array of X;
var i: integer;
for i:= 0 to n do
begin
Y:=X;
end;
Hope it can help,
Regards,
B.
dynamic array structures: there is nothing like that in the core elements of pascal script.
however you could build it a list/set-type thing with a procedure yourself - if needed.
set array lengths: there is setArrayLength(array, int)
// declaration as bmoussay wrote
// init a 16x16 matrix with value 1
setArrayLength(Y, 16);
FOR i := 0 TO 15 DO BEGIN
setArrayLength(Y, 16);
FOR j:=0 TO 15 DO BEGIN
Y[j]:=1;
END;
END;
however you could build it a list/set-type thing with a procedure yourself - if needed.
set array lengths: there is setArrayLength(array, int)
// declaration as bmoussay wrote
// init a 16x16 matrix with value 1
setArrayLength(Y, 16);
FOR i := 0 TO 15 DO BEGIN
setArrayLength(Y, 16);
FOR j:=0 TO 15 DO BEGIN
Y[j]:=1;
END;
END;
btw: should bebmoussay wrote:Hi,
Have you tried:
type X: array of integer ;
type X =array of integer; // '=' instead of ':'
var Y : array of X;
Who is online
Users browsing this forum: Bing [Bot] and 17 guests
