home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!europa.asd.contel.com!paladin.american.edu!howland.reston.ans.net!sol.ctr.columbia.edu!eff!world!dcm
- From: dcm@world.std.com (David C McGaffin)
- Subject: Two-dimensional array simulation in Paradox
- Message-ID: <C1DM13.HLA@world.std.com>
- Keywords: PARADOX ARRAYS
- Organization: The World Public Access UNIX, Brookline, MA
- Distribution: comp.databases
- Date: Sun, 24 Jan 1993 20:53:26 GMT
- Lines: 19
-
- I recently was attempting to recreate a procedure called, Dim2()
- that I first saw when I was programming in Clipper Summer '87.
- The code I ended up with, now for Paradox 4.0, was this:
-
- proc closed Dim2 (aArray, nCol, nRow)
-
- return ( (nCol - 1) * (arraySize(aArray) / 2)) + nRow
-
- endProc ; Dim2
-
- This works fine, but it seems that in the original incarnation of
- Dim2(), there was no need to pass the array along with the row and
- column. However, I can think of no way to get the size of the
- array, without passing it to the procedure. Is the code above a
- reasonable duplication of Dim2(), or is there something else to
- it? I appreciate any response.
-
- - David M.
-
-