Pregunta

How to create a pascal function that doesn't have any arguments and returns an array??

¿Fue útil?

Solución 2

program Foo;
type
        TArray = array[0..9] of integer;
function newArray():TArray;
begin
end;

var
        arr:TArray;
begin
        arr:= newArray();
end.

Otros consejos

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;
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top