× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jon Paris wrote:
> Absolutely - I would always use dynamic memory when I didn't know how large
> something (like an array) might become.  But it is an unusual situation.  If
> I want a fixed length field of 256 - I specify it.  The point I was making
> was that the programmer in question didn't know RPG - not that dynamic
> memory was a bad thing - just that it was a bad _RPG_ example.

I've argued this point before.

If you're likely to have a relatively small amount of dynamic data,
I'd just stick with a static array, instead of dynamically
allocating storage based on the actual number of elements.  Note
that if you dynamically allocate and reallocate storage as your
number of elements changes during processing, you're incurring a
fairly heavy overhead for that processing.

On the other hand, if you have a large amount of dynamic data,
you're probably better off using a database file.

Either way, you end up not having to deal with those nasty pointers,
the "goto" of data structures.

Cheers!  Hans





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.