It is always wrong to specify directly in a calling program which branch the execution should take in a program that is called. It does not matter whether it is using GOSUB @variable or CASE statement. It is also wrong to pass into the called program the information from where it is been called. Each parameter passed inside a program should have a business-related meaning, not programming jumbo-mumbo.
----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[email protected]> Sent: Saturday, February 11, 2006 4:11 PM Subject: Re: [U2] [UV] GOSUB variable-name? > The solution here is almost too easy. Build a CASE construct to GOSUB based > on the value of SUBNAME. As to the wisdom of this approach, I see no problems > whatsoever. Many called subroutines are "told" what to do by the caller. > What's the problem with that? > > Regards, > Charlie Noah > Inland Truck Parts > > In a message dated 2/10/2006 3:29:38 A.M. Central Standard Time, > [EMAIL PROTECTED] writes: > > This approach is absolutely awful from software design point of view. I > personally would hate to have to support software when it is the calling > program that decides the flow of the program that is been called. > Do you really need this? > > ----- Original Message ----- > From: "Barry Brevik" <[EMAIL PROTECTED]> > To: "U2-users (E-mail)" <[email protected]> > Sent: Wednesday, February 08, 2006 7:03 PM > Subject: [U2] [UV] GOSUB variable-name? > > > > I would like to pass a variable (let's call it "SUBNAME") to a subroutine, > > and this variable would contain the name of an existing label which I will > > call "TEST". > > > > The subroutine can then do GOSUB TEST, but GOSUB SUBNAME will not compile. > > > > Aside from CALL @VARIABLENAME, is there any way to branch indirectly in > > universe? This would be really useful for me. > > > > Barry Brevik > > ------- > > 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/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
