Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

how create dimensional arrays?

Ask for help
Post Reply
-k-
Neophyte
Neophyte
Posts: 41
Joined: 23.01.2012 0:22

how create dimensional arrays?

Post by -k- »

i try in pascal

VarName = array[1..3,1..3] of string;

doesn't work =[

thx
nah nah
Developer
Developer
Posts: 414
Joined: 13.07.2011 11:23
Contact:

Re: how create dimensional arrays?

Post by nah nah »

Fenix wrote:

Code: Select all

  dirs : array of array of integer;
begin
  SetLength(dirs, 9);
  dirs[0] := [0,1,2]; 
  dirs[1] := [1,1,1]; 
  dirs[2] := [1,0,2]; 
  dirs[3] := [-1,1,1]; 
  dirs[4] := [0,0,2]; 
  dirs[5] := [1,-1,1]; 
  dirs[6] := [-1,0,2]; 
  dirs[7] := [-1,-1,1]; 
  dirs[8] := [1,-1,2];
-k-
Neophyte
Neophyte
Posts: 41
Joined: 23.01.2012 0:22

Re: how create dimensional arrays?

Post by -k- »

thx man =]]]
drabadan
Expert
Expert
Posts: 730
Joined: 13.12.2012 17:35
Contact:

Re: how create dimensional arrays?

Post by drabadan »

-k- wrote:i try in pascal

VarName = array[1..3,1..3] of string;

doesn't work =[

thx
for strings you'd better use TStringList;
Here's the link about it!
Post Reply