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


  • Subject: RE: Scope of variables and subprocedures(typed pointers)
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Tue, 14 Dec 1999 11:54:42 -0800

I like the idea of typed pointers and the ability to dereference them.  It
could protect you from doing some things that would exemplify "unpredictable
results."  Seems like pointers in RPG are more useful for calling APIs or C
functions than they are in RPG.  I haven't found a need for a linked list or
other dynamic memory allocation thing yet.  

> -----Original Message-----
> From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com]
> Sent: Tuesday, December 14, 1999 11:18 AM
> To: RPG400-L@midrange.com
> Subject: Re: Scope of variables and subprocedures
> 
> 
> 
> 
> 
> >Date: 13 Dec 1999 18:05:36 -0600
> >From: "Scott Klement" <infosys@klements.com>
> > ...
> >I'd like to see
> >something similar to the way structures work in C, where you declare
> >a "type" of structure, and then can declare many different instances
> >of that data structure.
> 
> Me too.  In my mind, this is part of qualified names so I forgot to
> mention it specifically.
> 
> > ...
> >> - typed pointers with a dereference operator
> >
> >On this, I'm going to disagree with you :)   I program in both RPG
> >(on the AS/400) and C (on Unix) and I think that the way pointers
> >work in RPG is actually much easier to deal with and support.
> >Things start to get very complicated, IMHO, when you start doing
> >typed pointers and deferencing...
> >...
> >Perhaps you know of an advantage to derefencing that I'm not
> >considering?
> 
> I think it would be nice to be ABLE to declare typed pointers,
> and have the compiler complain if you tried to assign the wrong
> type of address to them.  Also, I think it would be nice to be
> able to directly use the result of a procedure that returns a pointer
> rather than have to assign the pointer to a based variable and then
> use that variable.
> 
> Maybe I was wrong to characterize this as "necessary", though.
> 
> Barbara Morris
> 
> 
> 
+---
| 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 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.