In Java we can initialize an array by following code:
data[10] = {10,20,30,40,50,60,71,80,90,91};
But in Pascal how can we do this?
Here's a full example program that compiles at http://www.onlinecompiler.net/pascal for both Windows and Linux.
program test;
var
data: array[0..9] of integer = (10,20,30,40,50,60,71,80,90,91);
begin
writeln('Hello World');
writeln(data[0]);
end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With