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



B += A;

On Sun, Feb 10, 2013 at 4:13 PM, Jerry C. Adams <midrange@xxxxxxxx> wrote:

Putting a CALLP, just to be clear, is like putting an EVAL on a free
format line. My boss (a .Net programmer) in days gone by could understand
a = B + C, but EVAL would have thrown him for a loop.

Sort of reminds me (now I'm showing my age) when in RPG II we could code
C ADD A B
Instead if
C B ADD A B

Which is clearer?

Jerry C. Adams
IBM i Programmer/Analyst
In a democracy the majority of the citizens is capable of exercising the
most cruel oppressions upon the minority. -Edmund Burke
--
Home Office: 615-832-2730
email: midrange@xxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Brian Parkins
Sent: Saturday, February 09, 2013 6:33 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: CallP Versus Program 'CALL'

Having said that, you should not be doing either one. CALL, CALLB
and CALLP are all obsolete. What you should be doing is prototyping
the program calls.

Alan, maybe I have misunderstood one of the points you are making. Taking
you own example:

D CreateBFile...
D Pr ExtPgm('ABCPGM')
D PR_CustomerNumber...
D 8a Const
D PR_Amount...
D 7p 2 Const
/Free

CreateBFile('A0001':12.50);

CallP CreateBFile('A0001':12.50);

/End-Free

There is _no_ difference between the two lines of code which invoke the
CREATEBFILE routine – both are calling an external program. As Joe Pluta
indicated, the CALLP operation can be omitted in the same way that EVAL can
be omitted in free-format calculations. CALLP is far from obsolete.

I agree program calls should be prototyped. However, the omission of the
CALLP, (from program and procedure calls) is just a matter of syntax and
style. (Personally, I prefer the CALLP to be explicitly coded so as to
avoid any possible confusion with function usage, array references, etc.)

Brian Parkins.
--
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.


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



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.