?
Solved

dynamic array in Delphi 6

Posted on 2002-04-28
7
Medium Priority
?
289 Views
Last Modified: 2010-04-04
How can I create a dynamic array of a user defined record ?

Andrew
0
Comment
Question by:andrewyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 100 total points
ID: 6976239
umm... try this?

type
  MyRecord = record
    a, b, c: Integer;
  end;

var
  MyArray: array of MyRecord;

and in your code:

SetLength(MyArray, 100);
0
 

Author Comment

by:andrewyu
ID: 6976263
I tried it, but, I cannot use SetLength.

Andew
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 6976271
why can't you use SetLength ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:ginsonic
ID: 6976296
Maybe you don't have in uses System unit . Or anothers units that use this one.
0
 

Author Comment

by:andrewyu
ID: 6976306
Thank you very much.

Problem is fixed.

Andrew
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6976335
Oh, thank you very much means a grade C? :)
0
 

Author Comment

by:andrewyu
ID: 6976350
Actually, I got this answer in previous post. But, got some problem in setlength.

However, setlength is ok now.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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