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



Bob P. Roche wrote:
Isn't one of the features of prototyping calls that always gets pointed out, "the compiler checks your data to make sure you don't have a mismatch"? If the compiler is just going to change my data to whatever it thinks it needs, how is that helping me not make a mistake and reverse parms? I know it will get caught in testing, but prototyping was supposed to save me from this kind of mistake at compile time, unless I specifically told it not to by using CONST.

I guess if all the parameters had slightly different types, you could get that kind of parameter-order check.

But to ensure that check was reliable, you'd have to avoid using CONST and VALUE and you'd have to give a slightly different data type to each parameter. Those seem like awkward restrictions to deal with.

Prototyping was supposed to save you from making type and size mistakes with individual parameters, but there was no particular intention that RPG programmers would use the parameter checks to make sure the parameters were passed in the right order.

But ... that's one of the scenarios that would have to be considered when deciding whether there would be a new keyword or whether the behaviour would just change.

This reminds me of a few complaints when the LR indicator was made optional on the READ opcode. People complained that the editor didn't forced them to code the indicator, so they also forgot to code the eof check.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.