|
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Mark S. Waterbury
Envoyé : samedi 15 mai 2010 03:36
À : RPG programming on the IBM i / System i
Objet : Re: Parameter prototype question
Hi, Barbara:
Given this whole set of problematic scenarios, would it
perhaps not be an improvement to have perhaps a new option on
the compile commands to allow the RPG IV compiler to at least
flag these situations with a WARNING message? Then, at least
the programmer could look at those warnings and perhaps take
preventive / corrective action accordingly.
Mark S. Waterbury
> On 5/14/2010 8:24 PM, Barbara Morris wrote:
Rory Hewitt wrote:have to move
...
However, if you *don't* have CONST specified, you always
pass it tothe value from the 10P 0 field into a 5P 0 work field to
just shiftedthe procedure. Since that process (before you've even called theIt's true that the procedure call won't fail, but you've
procedure) will stop you from passing a value that's> 99999, then
the procedure call itself will never fail. ...
the problem to the assignment statement where you set upyour 5P variable.
5P variable
If the 10P variable has a value bigger than 99999, you will get an
exception no matter how you try to pass it to a 5P parameter. The
exception will happen either when you copy it to your own
to satisfy the non-CONST parameter, or when the compilercopies it to
its 5P temporary for the CONST parameter.assignment. Or, to
So you not only have to manually verify every CONST or VALUE
parameter, you also have to manually verify every
put it another way, if for some reason you don't need to manuallyand VALUE parameters either.
verify every assignment, you shouldn't need to verify CONST
--
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.