> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of Mecki Foerthmann
> Sent: Tuesday, February 08, 2011 3:25 AM
> To: U2 Users List
> Subject: Re: [U2] Does UV have a "BLOCK" command
>
> Isn't END BLOCK just a label?
> So what is the difference to calling your label END.BLOCK and use GO
> END.BLOCK instead of EXIT?
> Or you could use a combination of CASE and IF...THEN...ELSE.
> No need for yet another useless statement IMHO.
>
While the above is functionally the same. And I have no problem
what so ever in utilizing that blasphemous GO statement ;) again,
in this particular program, I have about 20 blocks. I could use
20 labels (ENDBLOCK1 ... etc), but why setup a label at all, just
to create an exit jump point.
Yes, when it's compiled, the system will create it's own label,
but that is when it's compiled, and I don't care how the system
compiles it (for this program anyway) so long as it works.
I wouldn't consider this to be a useless statement. Having the
ability to have an anonymous block could have it's merits. For
one you could reuse sections of the code, without having to go
in and remember (1 of these usually slips by sometimes) to change
your GO labelname to the new exit label name.
But...as I stated, Gosubs would work, labels/goto's would work
negative if's would work, even Wills control blocks and I wouldn't
hestitate to use each of these methods when each would be best.
But since, the anonymous blocking can be emulated with the EQUates
This will become another tool in programs, and for my needs, is the
best fit for this particular program.
The final emulation would look like:
*
EQU BLOCKSTART LIT "LOOP"
EQU BLOCKEND LIT "EXIT ; REPEAT"
*
BLOCKSTART
CODE
CODE
IF () THEN EXIT
CODE
CODE
BLOCKEND
*
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users