|
Hi Vern,
I am aware that if you do not declare the pointer, then the compiler will do it for you.
I was trying to imply that one should not declare the pointer explicitly for a template.
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Vern Hamberg
Envoyé : jeudi 24 septembre 2009 15:15
À : RPG programming on the IBM i / System i
Objet : Re: Problem with non QUALIFIED DS
David
A dummy pointer is often used - before v6r1 - to declare a
template variable or structure. It uses no memory, but it can
be used to define other data structures with LIKEDS - a very
handy thing. The basing pointer is also useful for data type
definitions similar to what C/C++ has. You then use the LIKE
keyword in your code.
Vern
David FOXWELL wrote:
Thanks Birgitta, I shall keep your example for futurereference. I find it a little hard reading pulling in 1
prototype at a time. Then again, the prototypes that caused
my problem were prototypes I didn't even need!
I have another question concerning the dummy pointer. Itseems I am the only one here that never declares that
pointer. It seems to me that if you declare it, you intend to
use it, and all the data structures based on it can then be
used. Is it unwise to declare the pointer for template based fields?
-snip-
As an Amazon Associate we earn from qualifying purchases.
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.