Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables on the fly?? 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does Delphi 6 allow variables to be created on the fly?

In-perticular im wanting to create arrays on the fly.. i know pascal cant do this, im hoping the new delphi can :)

Thanks all...

admin@e-tones.co.uk
 
Speed Demon,

Maybe you could be more specific about what you are trying to do. Delphi doesn't allow you to use variables that you haven't set up (like VB used to - don't know if it still does), but it does allow you to allocate memory on the fly. For example, you could create a bunch of TButtons on your form at run time.

TealWren
 
I would look at the TList object. You can store all kinds of things in a TList - it could be an array or a list of structures. TList comes with a bunch of built in methods and properties that make using stuff in the list easy.

You can try creating a new type of variable using TYPE and then look at the New() function for creating new instances of that variable on the fly...

Good luck!

DjangMan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top