program Foo;
type
TArray = array[0..9] of integer;
function newArray():TArray;
begin
end;
var
arr:TArray;
begin
arr:= newArray();
end.
Pascal: how to write function without arguments?
-
14-10-2022 - |
Question
How to create a pascal function that doesn't have any arguments and returns an array??
Solution 2
OTHER TIPS
It was back then in turbo pascal 7, i don't think it would have changed.
type
IntArray = array of Integer;
function MyArray():IntArray
begin
MyArray:=[1,2,3];
end;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow