I just had a nap.. I'm fresh. ----- Original Message ----- From: "Bruce Chitiea" <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Thursday, June 28, 2012 6:05 PM Subject: [RBASE-L] - Re: 'One Use', 'Self-Extinguishing LABEL ....possible?
!!!!!!!!! Too easy. Bruce -------- Original Message -------- Subject: [RBASE-L] - Re: 'One Use', 'Self-Extinguishing LABEL .... possible? From: "Mike Byerley" <[email protected]> Date: Thu, June 28, 2012 2:49 pm To: [email protected] (RBASE-L Mailing List) encapsulate your code in a stored procedure and anywhere you use the stored procedure code, precede it with the DEBUG statement and it will only execute when DEBUG is ON. From the Help File: DEBUG Operating Condition Syntax: SET DEBUG ON/OFF Default: OFF You can use SET DEBUG as follows: 1. Precede any R:BASE command you want to control with the DEBUG modifier in a command file. 2. Set DEBUG on to have R:BASE run the command; set DEBUG off to have R:BASE ignore the command. ----- Original Message ----- From: "Bruce Chitiea" <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Thursday, June 28, 2012 5:10 PM Subject: [RBASE-L] - 'One Use', 'Self-Extinguishing LABEL .... possible? All: I use a [CHOOSE vopmode FROM #LIST 'TestRun,GoLive'] structure at the top of a master shell file to toggle between live and test target-tables during development. Conditional PAUSE structures visually confirm results of each major step. When I'm 'GoLive', I'd like to jump over these PAUSE structures by wrapping them in an [IF vopmode = 'GoLive' THEN GOTO localjumpover ENDIF]. That means one heckuva lot of unique 'localjumpover' LABELs to manage. Can anyone suggest a means of producing a self-extinguishing, one-shot local LABEL whose literal text may be used repeatedly within a file; or is there a better way to perform a strictly local jump; or can a label value be purged immediately after its use; or is this idea a good enhancement candidate? ********** FWIW here's one experimental structure whose sole virtue (until the end of the file is reached) appears to be that the default direction of a GOTO statement is down; every '.vlocal' label has the same value at any given point in time. But I hope you can see what I'm getting at. --Initialize Variables SET VAR vopmode TEXT = NULL SET VAR vlocal TEXT = NULL SET VAR vlocaltemp TEXT = NULL SET VAR vlocalnum INTEGER = NULL SET VAR vmessage_local TEXT = NULL --Set Variables SET VAR vlocaltemp = 'JUMP' SET VAR vlocalnum = 0 --Choose Operating Mode CHOOSE vopmode FROM #LIST 'TestRun,GoLive' . . . --Conditional PAUSE Structure #1 IF vopmode = 'GoLive' THEN SET VAR + vlocal = .vlocaltemp, + vlocalnum = (.vlocalnum + 1), + vlocal = (.vlocaltemp + (CTXT(.vlocalnum))) GOTO &vlocal ENDIF PAUSE 2 USING 'This is test pause #1' + CAPTION 'Test PAUSE #1' LABEL .vlocal {Value of vlocal at this point is 'JUMP1'} Cheers, Bruce

