Quote:

>I want to create a multiplication table for the values 1-9, To do this I

>propose to use a 2 dimensional array [1-9,1-9].

>then I propose to create another array is created for the result. eg 4 * 7

=

>28

>Then I need to separarate the two digits of 28 into 2 and 8 (how to do

>this?). and put them into separate arrays again.

>But if I do this for all the digits 1-9 would result in a 2 * 9 * 9 array.

>This would be huge.

>Am I thinking along the right track or could it be done easier?

If I'm understanding correctly you want to create a "multiplication table"

for values 1 to 9.

Which mean you like to be able to look up any multiplication from 1*1 to

9*9?

And then you like to split the digits.

Why not just do the following.

var

table:array[1..9,1..9,1..2] of byte;

i,j:integer;

begin

for j := 1 to 9 do

for i := 1 to 9 do

begin

table[i,,j,1] := (i*j)mod 10;

table[i,,j,2] := (i*j)div 10;

end;

And by the way 2*9*9 isn't to big by a long shot!

You can have up to about 60000 bytes in an array.

Chaou

Heinrich

Check my web-site:

http://homes.arealcity.com/Heinrichshomepage/

Includes a complete TP tutoriul and more!