I would combine different functions into one program only when I have to
preserve a state between calls to different program (in my example - to
preserve variables with file handles) and avoid using COMMON to pass data
between programs.

----- Original Message ----- 
From: "George Gallen" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Thursday, February 16, 2006 3:50 PM
Subject: RE: [U2] [UV] GOSUB variable-name?


> I initially thought that same thing :)
>
> However, since READ and WRITE are both I/O functions
>   and the name of the routine is IO.PROGRAM which fit
>   the description
>
> Whereas, GetCustomerBalance and PaintScreen are two
>   unrelated (supposedly) subroutines.
>
> I'm guessing the answer is it's ok to combine like subroutines
>   into one subroutine with a passed function variable but not
>   ok to combine unlike subroutines with a passwd subroutine
>   variable??
>
> George
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Thursday, February 16, 2006 10:35 AM
> > To: u2-users@listserver.u2ug.org
> > Subject: Re: [U2] [UV] GOSUB variable-name?
> >
> >
> > On 14 Feb 2006, "Serguei" <[EMAIL PROTECTED]> wrote:
> >
> > > Why not instead of CALL SomeProg('GetCustomerBalance',...)
> > > and CALL SomeProg('PaintScreen',...)
> > > do:
> > > CALL GetCustomerBalance
> > > Call PaintScreen
> >
> > On 16 Feb 2006, "Serguei" <[EMAIL PROTECTED]> wrote:
> >
> > > ... never again anywhere in your programs you will
> > > have to write
> > > READ RECORD FROM FILE,KEY THEN
> > > or
> > > READ RECORD TO FILE,KEY THEN
> > > Just do:
> > > CALL IO.PROGRAM('READ',TABLE.NAME,KEY,RECORD,OK)
> > > or
> > > CALL IO.PROGRAM('WRITE',TABLE.NAME,KEY,RECORD,OK)
> >
> > Okay - which is it?  Should one write a single routine to
> > handle multiple
> > functions or not?
> >
> > You have promoted both viewpoints as absolutes.
> >
> > --Tom Pellitieri
> >   Century Equipment
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to