There are two benefit: 1. You can have a COMMON with opened files in one program only 2. If in the future you need to modify the way system reads or writes data into database (e.g. adding additional checks, logging data update, reporting on errors) you don't have to look for and modify all programs where you read or write - you have to change only one program.
----- Original Message ----- From: "Bob Woodward" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, February 16, 2006 4:43 PM Subject: RE: [U2] [UV] GOSUB variable-name? > I'm a bit confused, too, as to the benefit one would receive by calling > a program to do the reads and writes vs. an internal command to read and > write. I mean, after all, you still have to test OK for a status value. > Maybe I'm being too literal on the use of the READ command used as an > example... > > BobW > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Thursday, February 16, 2006 7:35 AM > To: [email protected] > 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 > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ > ------- > u2-users mailing list > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
