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?
-
amiga909
- Member
- Posts: 324
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;
