Amongst the enhancements in 7.1 was the following:
If a program or procedure is not called by another RPG module, it is optional to specify the
prototype. The prototype may be omitted for the following types of programs and procedures:
v A program that is only intended to be used as an exit program or as the command-processing
program for a command
v A program that is only intended to be called from a different programming language
v A procedure that is not exported from the module
v A procedure that is exported from the module but only intended to be called from a different
Because of the conditions listed, I had not given this enhancement much thought - until now. Recently, I tried out a few examples of normal RPGIV-to-RPGIV calls with the above enhancement in mind.
My experiments revealed that for both program and procedure calls, the Prototype in not required within the Called routine, even when performing a normal RPGIV-to-RPGIV call. I confess I do like not having to replicate the Prototype in the Called code. (Not least because it makes it easier to explain to RPG novices.)
My qustion is this. Am I doing anything that I really should not? In other words, have I found a "loop hole" which may affect my code in the future?
Let me make it clear that I understand the benefits of including the Prototype in the Called program/procedure. However, is this a NECESSITY for normal inter-program calls which do not meet the conditions listed above?