George,

Another option, though not anywhere close to perfect!, would be to make use of 
the EQU statement.  You could equate BLOCKSTART and BLOCKEND to LOOP and 
REPEAT, respectively.  The (major) downside: you don't get the auto-indenting 
you get with LOOP and REPEAT (unless you're using an IDE that lets you specify 
keywords to indent on).

Drew

"Providing useless information for over a quarter century!"

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com
Sent: Monday, February 07, 2011 4:59 PM
To: u2-users@listserver.u2ug.org
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 <ggal...@wyanokegroup.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
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: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-

> boun...@listserver.u2ug.org] 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

> U2-Users@listserver.u2ug.org

> http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________

U2-Users mailing list

U2-Users@listserver.u2ug.org

http://listserver.u2ug.org/mailman/listinfo/u2-users




 
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to