Call by value/Reference

480 pts.
Tags:
RPGLE
Hi,

Please explain with the example of call by value and call by reference in RPGLE.

Thanks


Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta

    To start, there is no "call by value" nor "call by reference". Instead, it's passing a parameter by value or by reference. Either the value of a parameter is passed or a reference (i.e., an address) to the parameter is passed. Each parameter in a parameter list can be passed by value or by reference.

    A fundamental restriction is that RPG can only pass by value to a procedure, not to a program. The way to specify "by value" is to use the VALUE keyword on the parameter when defining the procedure prototype. An example would simply have the VALUE keyword while the keyword wouldn't be used for a "by reference" parameter.

    Tom

    125,585 pointsBadges:
    report
  • as400dev
    Thanks Tom, Your response is very much appreciated. :)
    480 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following