|
Can someone explain the difference between a basing pointer in RPG and a
pointer in C? Is there some other kind of pointer besides a basing
pointer in RPG?
Can someone explain how to do write the following C code in RPG:
void
main (){
char *buffer;
buffer = (char *) malloc (sizeof(char) * 1024);
return;
}
I know that I need to do something like:
D ptr S *
C alloc(e) 1024 ptr
but now how do I specify that ptr points to a buffer of type char? Even
better: how do I use alloc to allocate memory that looks like this:
D data DS
D field 100A
basically I want a 2-dimensional array that I can dynamically increase or
descrease.
James Rich
james@dansfoods.com
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.