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



On 2017-02-01 4:13 PM, Tools/400 wrote:
...
But I do not agree with you regarding the EXTPROC keyword. Reading a
stack trace or an error message is a lot easier, when the procedure name
is shown in camel case. Just my opinion and not necessarily yours. ...

For internal procedures, you don't need a prototype starting in 7.1.

I agree that it's much nicer for the joblog, stack trace etc to have the name in camel case.

But if you use free-form declarations (available starting in 7.1), you can avoid typing the procedure name twice by using EXTPROC(*DCLCASE). That will cause the external name to have the same case as you used for the prototype itself, or for the procedure if you don't use a prototype.

If you do code a prototype, put extproc(*dclcase) on the prototype:

dcl-pr c2f zoned(5:2) extproc(*dclcase);
$c zoned(5:2) value;
end-pr;

If the procedure is internal and you don't code a prototype, code the procedure like this, putting the extproc(*dclcase) on the PI.

dcl-proc c2f;
dcl-pi *n zoned(5:2) extproc(*dclcase);
$C zoned(5:2) value;
end-pi;
dcl-s $F zoned(5:2);

eval(h) $F = (($C * 1.8) + 32); // use rounding
return $C;
end-proc;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.