Solved

Function array

Posted on 2000-02-26
2
155 Views
Last Modified: 2010-04-04
Hi,

Is it possible to write a function that returns a array of integers?

If it is possible please show me a exemple of it.
0
Comment
Question by:MarioVDW
2 Comments
 
LVL 4

Accepted Solution

by:
mhervais earned 10 total points
ID: 2560928
You can create a class that holds an array if integers and write a function that returns an instance of if

like :

TMyarray = class(tobject);
private
  myarr : array of integer;
end;

and a function :

function myfunc : TMyarray;

regards, Marc
0
 
LVL 6

Expert Comment

by:edey
ID: 2562088
you can also return a pointer to an array of integers.  D4+ gives you open arrays, for D2..3 try

type
 TIntegerArray = array[0..0] of Integer;
 PIntegerArray = ^TIntegerArray;

just remember to give the number of elements in the array

GL
Mike
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question