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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ARRAYS IN PARADOX

Status
Not open for further replies.

robert9

Technical User
Aug 17, 2001
3
GB
How do you deal with arrays that a more than single dimension arrays in Paradox?

Can you use martix algebra procedures written in C++ , for example?
 
Sorry, but Paradox doesn't support multi-dimensional arrays.

You can:

1) Use tables.
2) Create custom record types and then create arrays of those records
3) Create a DLL using Borland Delphi or C++ Builder. (Paradox will interface with properly designed DLL's that do not require complex data types in their interfaces.)

Hope this helps...

-- Lance

P.S. I have seen people simulate multi-dimensional arrays using code tricks, but the simple fact of the matter is that they're not supported. Use tables instead.
 
The simplest way in which I have handled faux 2 dimensional arrays in Paradox is to create an array twice the size you need, then fill it in such a manner that you can easily reference each cell with a simple addition (or subtraction) of the cell references. e.g. I need a "2 dimensional" array called arExample that is 5 x 2 in size. I would fill my one dimensional array in such a manner that cells 1 and 6 are related, as well as 2 and 7, 3 and 8, and so on. When I need to retrieve the value(s), I would simply ask for arExample[x] for the first value, then arExample[x + 5] for the second value. The same things can be done with Arrays that have no defined size by using the grow() method.

Allen Troxell
 
Thanks for these replies, they are very helpful.
Regards,
Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top