Board index » delphi » How to create dynamic arrays of records?
Dave Brown
![]() Delphi Developer |
Mon, 05 Jun 2000 03:00:00 GMT
|
Dave Brown
![]() Delphi Developer |
Mon, 05 Jun 2000 03:00:00 GMT
How to create dynamic arrays of records?This question is so simple that the title says it all. How do I create Thanks for any responses Dave Brown |
Dave Brow
![]() Delphi Developer |
Mon, 05 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?This question is so simple that the title says it all. How do I create Thanks for any responses Dave Brown |
Dave Brow
![]() Delphi Developer |
Mon, 05 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?This question is so simple that the title says it all. How do I create Thanks for any responses Dave Brown |
David A. Schweiz
![]() Delphi Developer |
Tue, 06 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?QuoteOn Thu, 18 Dec 1997 23:24:19 -0800, Dave Brown <D...@Brown.org> wrote: then to allocate only part of it: type TMyRecord = record {... } end; const type var begin { using the array: } { deallocating } end. This is the basic trick. For two-dimensional arrays, you would have to hth iec ProGAMMA, The Netherlands |
Robert Le
![]() Delphi Developer |
Tue, 06 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?QuoteDavid A. Schweizer wrote: TMyArray = array[0..0] of TMyRecord; and turn off range checking on the compiler options page. The eliminates the Bob Lee |
Dave Shapir
![]() Delphi Developer |
Tue, 06 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?QuoteDave Brown wrote: should be large enough.') at compile time. It's ducking the issue. Delphi isn't very nice about pointer arithmetic, but a good wrapper I have a TDoublePointArray class which automatically allocates type It has an indexed Points[] property that returns any point in the array. Give me an email and I'll send you the source. It even works in (*gasp*) Cheers, Dave |
Peter N Rot
![]() Delphi Developer |
Tue, 06 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?QuoteDave Brown wrote in message <67d7cj$...@bgtnsc03.worldnet.att.net>... For matrices & the like, check out our Matrix Math Toolkit |
Enrique Pol
![]() Delphi Developer |
Tue, 06 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?The answer is as simple as the question: Look in your Delphi Help file for the following topics: varArrayCreate function { This allows you to create a variant size varArrayReDim function { This allows you to resize a previously created The beauty is, since they are functions that return pointers to a variant procedure VarArrayExample; NumFields := 100; QuoteDave Brown wrote in message <67d7cj$...@bgtnsc03.worldnet.att.net>... |
Peter N Rot
![]() Delphi Developer |
Tue, 06 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?QuoteEnrique Polo wrote in message <67eknv$...@nrtphc11.bnr.ca>... "interface compatibility", and trade away type-safety for slower code. Better to use a TList or a derivative thereof. -- Grace + Peace | Peter N Roth | Engineering Objects Int'l Author: "Creating a Robust Type-Safe TList", Delphi Developer Oct 97 Visit our website at http://www.inconresearch.com/eoi "On the internet, nobody knows you're a dog." - P Steiner |
Ashok Thirumurth
![]() Delphi Developer |
Sat, 10 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?How about an array of a union of pointers that are allocated as needed. The Ashok Thirumurthi QuoteDave Brown wrote: |
Sundial Servic
![]() Delphi Developer |
Sun, 11 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?In article <34A02546.657D9...@compuserve.com> Ashok Thirumurthi <73060.3077.fooled....@compuserve.com> writes: Quote>How about an array of a union of pointers that are allocated as needed. The container class that will support a multidimensional array. Each of the records is a separate object, and the container-class provides access to them. For example, the SysTools package (Turbopower Software) provides about four For example, one class that I built, using SysTools to provide the underlying Notice that the container-class presents the *behavior* of an array without And notice also that I referred, twice, to buying or downloading something |
Mike Powel
![]() Delphi Developer |
Sun, 11 Jun 2000 03:00:00 GMT
Re:How to create dynamic arrays of records?QuoteSundial Services wrote: be to "wrap" (or just use "as is") the TList. TLists are very good at storing generic pointers to data. I use them all the time. It sure beats having to come up with another container or reinvent the wheel as it were. |
1. Tips on dynamic arrays, and help with dynamic arrays of records
2. dynamic arrays inside records
3. file of record with dynamic array
5. Saving Dynamic Array of Record to File???
6. sending dynamic arrays of record's thru socket
7. How To Store Points in a Dynamic Array of Record Type