|
Hmm...speaking as the C.Wilt in question.... :)
Not sure I see much benefit to having the pop-up calender as a service
program instead of a program.
I suppose one could argue that the invocation would be a bit nicer
mydate = Popup_Calendar();
vs
mydate = %date();
Popup_Calendar(myDate);
It really wouldn't be difficult to make into a service program.
Charles
On Mon, Jan 6, 2014 at 2:49 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
I wish I understood service programs better. There is one application I
believe would be an excellent service program but I do not know how to
do it.
http://martinvt.com/Code_Samples/Pop-up_Calendar/pop-up_calendar.html
It is a pop-up calendar. Its not my code but I have shown it on my web
site and I have modified it and C. Wilt fixed it up a couple of years
ago. It just seems to me that it would be a desirable service program.
On 1/6/2014 9:13 AM, Michael Schutte wrote:
I would start small. Do you do any centering of text in fields, say on ause
display or printer file? If so, put the code in a service program and
that as an example to be able to reuse code.programs
On Sun, Jan 5, 2014 at 3:44 PM, TheBorg <sjl_abc@xxxxxxxxxxx> wrote:
IMHO, one big advantages of introducing subprocedures to existing
values]is the fact that as long as the variables used in the subprocedure are
either passed in or defined locally then there is no chance that
coupling-related issues [such as inadvertently stepping on global
--will arise...
;-)
"James H. H. Lampert" wrote in message
news:mailman.3432.1388168538.2717.rpg400-l@xxxxxxxxxxxx...
A couple of things on the "leave well enough alone" side:
1. It's entirely possible that (perhaps without anybody realizing it) a
program might very well *depend* on side effects of a subroutine playing
around with global variables, and if one switches to local variables,
eliminating the side effects, one could break whatever depends on them.
I've seen it happen. Usually the tipoff for something dependent on a
side effect is when it works even though it looks like it shouldn't.
2. Remember: when you have OPM and ILE calling each other across
activation groups, you have an "impedance bump," but when you have ILE
actually doing ILE things (like procedure calls) in the OPM activation
group (usually only when it's set to run in CALLER, and is then called
from an OPM program), you can end up with erratic behavior. (I try to
avoid situations like that on anything I let out of the building.)
--
JHHL
--
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 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.