matrix array

General discussion on mikroPascal.
Post Reply
Author
Message
mirkan
Posts: 41
Joined: 08 Dec 2005 07:59
Location: Türkiye

matrix array

#1 Post by mirkan » 13 Sep 2006 10:07

hi friends,
can we use matrix array in micropascal that is an array is
sample:array[0..5]of byte;
i want to use 3x6 matrix array.
sample[j] as well.
how can i do this.
regards...

billdrum
Posts: 51
Joined: 19 Apr 2006 03:13
Location: Zephyr,TX

#2 Post by billdrum » 13 Sep 2006 12:15

If you use Help , you'll find:

Code: Select all

 m: array[50] of array[20] of byte;   //2-dimensional array of size 50x20

mirkan
Posts: 41
Joined: 08 Dec 2005 07:59
Location: Türkiye

#3 Post by mirkan » 13 Sep 2006 16:02

hi
i havent found it.maybe my help files arent current version.i use mikropascal 3.2
could you say how can i get a value from 2-dimensional array.
sample:array[0..3] of array[0..6] of byte;

value:=sample[i,j];
or sample[j];
how is to be?
regards...

billdrum
Posts: 51
Joined: 19 Apr 2006 03:13
Location: Zephyr,TX

#4 Post by billdrum » 13 Sep 2006 16:32

For version 6.0.01.
Isn't the PDF version of help on the mp site?

Code: Select all

procedure example(var m: array[50] of array[20] of byte);  // we can omit first dimension 
begin
...
inc(m[1][1]);
end;

var
m: array[50] of array[20] of byte; // 2-dimensional array of size 50x20
n: array[4] of array[2] of array[7] of byte; // 3-dimensional array of size 4x2x7 
begin
...
func(m);
end.

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

#5 Post by piort » 13 Sep 2006 17:09

hi,
if my memory is good, version 3.2 dosent support multidimentional array.
I suggest to you to upgrade to version 6.0.1. With the program download, download the manuel in PDF format. Is the same info in manuel and hlp but you can print-it and read it anywhere :-)

mirkan
Posts: 41
Joined: 08 Dec 2005 07:59
Location: Türkiye

#6 Post by mirkan » 14 Sep 2006 06:32

hi
thanks for your help
i think mp 3.2 doesnt support 2-dimensional array.i have downloaded ver.6.0.0.1 and i have tried the same code again and it has employed.besides i have found it that how it is made in help files.
regards...

Post Reply

Return to “mikroPascal General”