I read the decoupling mentioned in advanced languages and think of rpgle 400

Source: Internet
Author: User

Suppose we write some core business processing intoProgramFixed conditions are used as the basis for business processing, So we write fixed parameters and call them in many places.
Of course, at the beginning, the program won't have too many problems.

1. When new business needs emerge, we need to add new conditions as the basis for judgment. What should we do and add a fixed parameter ??
However, some businesses do not need this new condition as the judgment basis. What should we do?

Solution:
1. Add a * nopass parameter to the entry parameter.

2. Use Pointer as entry parameter ~~

In this way, you only need to modify the core program, and then modify the program that requires this condition as the basis for business judgment. If you do not need to use it, you naturally do not need to re-compile it.

2. What should I do when new businesses emerge?
In the past, our program had no parameters. How can we be called without affecting the original menu call?
So entry parameter list, we use the optional parameter * nopass

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.