---- Borland's Delphi Discussion List <delphi@elists.org> wrote:
>
> Try this: (Compiled successfully but untested)
> 
> type
>     TArrayOfInteger = Array of Integer;
> 
> functon createarray(input: Array Of Integer): TArrayOfInteger ;
> 
> You can even replace the internal "Array of Integer" with the type.

You CAN, but that may not be desirable: "array of SomeType"(SomeType being 
Integer in this case) within a parameter signature is an "Open Array Parameter" 
which allows passing of arbitrarily sized and indexed arrays of SomeType to the 
function without typecasting.

With the parameter explicitly typed as TArrayOfInteger, you can only pass other 
TArrayOfIntegers to the function.

Stephen Posey
[EMAIL PROTECTED]

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

Reply via email to