× 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.



For amazing help with all these issues, especially pointers and the C functions, get the 2nd Edition of APIs at Work from MC Press - Bruce Vining formerly Mr. API at IBM did the revision - fantastic!

There are several APIs that might need reallocation of memory to accomodate the variable portion - then you just use based DS's to get at the data there - to a C programmer it is almost child's play but not too bad once you try a few examples.

Bruce - I'm always learning something new from you!

Vern

-------------- Original message --------------
From: "Schmidt, Mihael" <Mihael.Schmidt@xxxxxxxxxxx>

I can only agree to this. Though i think most RPG programs don't need dynamic
structures, there definitly are a lot of uses for such dynamically sized
structures if they were easily available to the RPG programmer. That is
definitly something IBM has missed to implement for the RPG community.

They have made a try by porting the Glib C functions to ILE C and made a service
program of the modules. But the version is a bit dated and with the Glib
functions you have to manage the allocated memory "on your own", which means
that it is not so easily to use as it should be IMO (and they didn't release the
prototypes to the procedures).

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Adam Glauser
Gesendet: Montag, 23. Juni 2008 16:17
An: rpg400-l@xxxxxxxxxxxx
Betreff: Should RPG programmers be dynamically allocating memory? was:
theadvantages of garbage collection

Joe Pluta wrote:
You
either do your own memory management (the C model), or you relegate it
to the runtime (the Java model). Technically, RPG follows the C model,
but very few programmers ever need to allocate memory. If you're
writing code that requires a lot of memory allocation, you're either
doing something you oughtn't to be doing, or you're as smart as Scott
Klement and you will do the memory management correctly.

I'm not entirely convinced that few programmers need to allocate memory.
How often do we RPG programmers put hard limits in our programs,
simply because using a dynamically sized structure is tricky?

Perhaps this is part of the reason we don't have as many tool libraries
as are available in other languages, as lamented by Tom Liotta in the
"RPG is Dead" thread.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.