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


  • Subject: Procedures/SubProcedures
  • From: Jon.Paris@xxxxxxxxxx
  • Date: Mon, 14 Feb 2000 17:07:34 +0100



 >> I guess my real question is how to tell the difference between a procedure
and a subprocedure.

Not sure why you want to tell the difference Ron but ....

The difference is one of RPG terminology.  From an ILE perspective they are the
same thing and are called with the same mechanisms.

An RPG "program" compiles to a procedure, and in the V3R1 version there was only
one user defined procedure per compilation unit.  So when they decided to allow
multiple procedures per compilation unit they decided to give them the a
different name and Subprocedures i.e. non-main procedures seemed to fit the
bill.

The primary differences from an RPG perspective are that a subprocedure by
default has automatic variables (i.e. they are created on each call), can
optionally have static variables, and can return a value.  RPG "main" procedures
on the other hand have static storage by default, cannot have automatic storage,
and cannot return a value.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.