Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 18 MAR 1998 01:50:28AM Matt Sorrell - MGA, INC wrote:

I recently wrote a program that performs a select on our member table based on certain criteria. I then loop through the record set, performing some calculations, and printing out a report.

My problem is this: The first member record I read, I DIM an array equal to the size of a MV field in the member record. For the next member record, I need to basically REDIM the array to a new size. The R/BASIC reference manual says that this can't be done, and I haven't found a way to spoof it yet.

What I was wondering, is there any way to fake a REDIM statement that will allow me to change the size of a DIM'ed array? Currently I'm DIM'ming the array to a sufficiently large enough size that none of the member records should exceed that size. However, I'm not comfortable with this work-around.

Any advice anyone might have would be appreciated.

TIA,

Matt Sorrell

M.G.A., Inc.


At 18 MAR 1998 02:07AM Jeff Blinn wrote:

If you can deal with the compiled data in 64K chunks or less, why not just assign values to a variable using varname. Unless this doesn't meet your needs - I'm not exactly clear on what you're trying to do.

Jeff


At 18 MAR 1998 02:59AM Curt Putnam wrote:

Matt,

This is a classic case of needing to modify thinking to best use dynamic arrays. The whole point of Arev is to avoid limits (despite those that do exist.) The answer to your question is to simply NOT use DIM'd arrays and to instead use dynamic arrays.

Unless you files have record counts in the millions, most machines will handle dynamic arrays with respectable speed.


At 19 MAR 1998 10:44AM Aaron Kaplan wrote:

There is no way to trick it, at least not without genning some severe ASM code, and even then, there's no guarantee it's wouldn't send memory into a screaming tailspin.

Shame you're not using OI. You could probably do something with a labeled common and a freecommon, then re-dimensioning the arrays that way.

[email protected]

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/572faf4b21792233852565cb00201612.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1