home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9371 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.1 KB  |  31 lines

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