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




I'm kind of curious as to what value the caller received if the 2nd
return was executed. Zero perhaps?

The program ends with RNX0224:

Additional Message Information

Message ID . . . . . . : RNX0224 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 02.01.14 Time sent . . . . . . :
09:22:33

Message . . . . : RPG procedure PERFORMADD ended without returning a
value.
Cause . . . . . : Procedure PERFORMADD in module TEST_F14 in program
RADDATZ/TEST_F14 was expected to return a value, but the end of the
procedure was reached without a RETURN operation being done.
Recovery . . . : Contact the person responsible for program
maintenance to
determine the cause of the problem.


rpg400-l-bounces@xxxxxxxxxxxx schrieb am 31.12.2013 16:28:40:

Von: david@xxxxxxxxxxxx
An: rpg400-l@xxxxxxxxxxxx,
Datum: 31.12.2013 16:28
Betreff: Interesting restriction on the rules between releases
Gesendet von: rpg400-l-bounces@xxxxxxxxxxxx

Folks:

I just noticed something interesting ... some rules got tightened in
the RPG compiler between V5R4 & 6.1.

We have a procedure that returns a 4,0 number ... the prototype &
interface both specify the return value.

The procedure is coded with multiple exit points. One in the middle
of the logic (a short circuit exit) and another at the very end.

The short circuit exit is coded as 'return value;'. The exit at the
end is just a 'return;'. Clearly a coding error.

On the face of it, I would expect this compile to fail due to the
lack of a return value on the 2nd return. But, on V5R4, it doesn't.
The compile WILL fail if neither of the return statements specify a
value.

On 6.1, however, the compile DOES fail because the 2nd return
statement doesn't specify a value.

I'm kind of curious as to what value the caller received if the 2nd
return was executed. Zero perhaps?

david

--
IBM i on Power Systems: For when you can't afford to be out of business!

I'm riding a metric century (100 km / 62 miles) in the 2014
Chicagoland Tour de Cure to raise money for diabetes research,
education, and advocacy. Sponsor me by visiting http://
archive.ridewithdavid.com. Any amount is appreciated.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.



--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.

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.