|
There are three problems with the pointer-based-template approach -
both solved by the "real" template support in 6.1
1) A based DS cannot specify INZ values.
2) The compiler cannot detect that you didn't really mean to reference
a field in the template. You won't find this out until run time when
it goes book with a pointer exception. Which of course is only a
problem for people who don't test fully <grin>
3) The cast majority of RPGers on seeing the BASED keyword will go
"What the ... " - I used to teach this technique in my sessions on the
D-spec but have all but dropped it (and relegated it to notes pages)
because such a large percentage of the audience just glazed-over when
they saw it.
Thank goodness Barbara added the real template support!
Jon Paris
www.Partner400.com
www.SystemiDeveloper.com
On 24-Sep-09, at 5:37 PM, rpg400-l-request@xxxxxxxxxxxx wrote:
Ah - understood - I just put some dummy pointer name in the data
definition when making a template, in effect - just as you say, no
need
for explicit declaration of the pointer.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.