Solved

Function array

Posted on 2000-02-26
2
153 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now