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 - |
Domanda
How to create a pascal function that doesn't have any arguments and returns an array??
Soluzione 2
Altri suggerimenti
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;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow