|
I know for a fact that a procedure can see file variables in the program. But I thought that a procedure could not see local variables in the program. Is this not true? By local variables I mean ones created in the D specs of the main program. Regards, Jim Langston Programmer/Analyst NT Administrator Cels Enterprises, Inc. (310) 838-2103 x604 -----Original Message----- From: Scott Mildenberger [mailto:Smildenber@Washcorp.com] Sent: Thursday, August 15, 2002 9:50 AM To: 'rpg400-l@midrange.com' Subject: RE: diff btw Procedures and Routines Jim, This isn't exactly true, a procdure that is defined in the same module as the main program can see all the variables in the main program. In fact, files (and thus their fields) cannot be defined in a procedure but they can be used there. Scott Mildenberger > -----Original Message----- > From: Jim Langston [mailto:jlangston@celsinc.com] > Sent: Thursday, August 15, 2002 10:47 AM > To: 'rpg400-l@midrange.com' > Subject: RE: diff btw Procedures and Routines > > > A procedure is encapsulated, where a subroutine is not. > > That is, a procedure can see variables that it defines, but > not variables that the main program defines. This makes it a > lot easier to determine what a procedure is actually doing > and where it's getting it's return value(s). > _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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 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.