07-25-2023, 09:41 AM
program ArrayExample;
begin
// Variable declaration
var
numbers: array[0..4] of Integer := (1, 2, 3, 4, 5);
matrix: array[0..2, 0..1] of Double := ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0));
names: array[0..1] of String := ('John', 'Amy');
// Output to screen
WriteLn('Numbers:', numbers);
WriteLn('Matrix:', matrix);
WriteLn('Names:', names);
end.
begin
// Variable declaration
var
numbers: array[0..4] of Integer := (1, 2, 3, 4, 5);
matrix: array[0..2, 0..1] of Double := ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0));
names: array[0..1] of String := ('John', 'Amy');
// Output to screen
WriteLn('Numbers:', numbers);
WriteLn('Matrix:', matrix);
WriteLn('Names:', names);
end.
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos