That should accomplish the goal, although it brings in a lot of logic checks that confuse the issue of the program. Again, it's the readability that I'm after in this case and the flexibility to move the code.
If you needed to step through the code (not with the debugger) with your eyes, there just a lot goin on. With the block / exit format, as you go through the block, once it hit an exit...that's it, your done, next section. > -----Original Message----- > From: [email protected] [mailto:u2-users- > [email protected]] On Behalf Of [email protected] > Sent: Monday, February 07, 2011 4:59 PM > To: [email protected] > Subject: Re: [U2] Does UV have a "BLOCK" command > > George, if I understand your requirement, and your addenda then may I > present a solution, which > 1) allows ignoring all subsequent actions at any point; and > 2) is completely re-arrangeable at whim; and > 3) allows any number of conditional testing to be done at any random > point within the entire block. > > As you can see, every sub-area below may be moved up or down the ladder > without harming the logic and you don't need the Loop confusion. All > you sacrifice is the 3/100ths of a picosecond it takes the system to > re-evaluate a condition it already knows. > > > Equate false to 0, true to 1 > George.is.done = false > Check some condition and set George.is.done true or false > If Not(George.is.done) then Do some code > Check some condition and set George.is.done true or false > If Not(George.is.done) then Do some code > Check some condition and set George.is.done true or false > If Not(George.is.done) then Do some code > If Not(George.is.done) then Do some code > Check some condition and set George.is.done true or false > If Not(George.is.done) then Do some code > Check some condition and set George.is.done true or false > Check some condition and set George.is.done true or false > If Not(George.is.done) then Do some code > .... > > > > > > > > > > > > > > -----Original Message----- > From: George Gallen <[email protected]> > To: U2 Users List <[email protected]> > Sent: Mon, Feb 7, 2011 1:33 pm > Subject: Re: [U2] Does UV have a "BLOCK" command > > > In this particular program, I will be rearranging the blocks of code > > into different orders, and it's easiest to read the logic of the > program > > top down. > > > > If I used subroutines, In order to keep that top down logic, every time > > I move a subroutine reference in the main code to a new location, > > I'd also have to move the subroutine code around also so if you were > > to read the program, it still flow top down, and your not hunting > out > > where each subroutine is. > > > > I use the small main with subroutines often. But in this case, > readability > > is the key. > > > > None of the other methods are wrong, just in this instance, I'd prefer > > not to use them. > > > > George > > > > > -----Original Message----- > > > From: [email protected] [mailto:u2-users- > > > [email protected]] On Behalf Of Steve Romanow > > > Sent: Monday, February 07, 2011 4:24 PM > > > To: U2 Users List > > > Subject: Re: [U2] Does UV have a "BLOCK" command > > > > > > On 2/7/2011 4:20 PM, George Gallen wrote: > > > > My main aversion to the subroutine method is that to me, I think > > > > of subroutines as code that used in multiple places, if it's > only > > > > used once, why not put in the main code. > > > > > > > > Yes, it can be used once....and still be a subroutine... > > > > > > > > George > > > > /listserver.u2ug.org/mailman/listinfo/u2-users > > > I like to use subroutines as a way to shorten my main loop into a > nice > > > concise routine. > > > If there is a good logical chunk, why not take it. Even if it is > only > > > used once. Something like GET.UPC or HANDLE.KIT > > > _______________________________________________ > > > U2-Users mailing list > > > [email protected] > > > http://listserver.u2ug.org/mailman/listinfo/u2-users > > _______________________________________________ > > U2-Users mailing list > > [email protected] > > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > > > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
