Re: [U2] [UV] Continuing Long Lines

2006-08-25 Thread BNeylon
I know you are UV, but sometimes UD and UV have commonalities.
Anyway, on UD we can use a pipe | as a line continuation.

   IF (TV AND TV2)  OR |
   (TV3  AND TV4) THEN
 CRT 'MATCH'
   END
Doubt if it will work on UV, but worth a try.

Bruce

Bruce M Neylon
Health Care Management Group 




Norman, David \(SAAS\) [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
08/24/2006 10:11 PM
Please respond to
u2-users@listserver.u2ug.org


To
u2-users@listserver.u2ug.org
cc

Subject
[U2] [UV] Continuing Long Lines






I have a complex IF command where the expression being evaluated is
rather long - IF (THIS AND THAT) OR (THIS AND THAT) OR ...
Can I break the expression onto several lines for readability ? I can't
find any reference to a continuation character in the manuals, and just
breaking the expression doesn't compile. I know I can put the THEN
clause on a separate line, but it's the bit between IF and THEN that I
want to split.


David Norman
Senior Software Engineer
SA Ambulance Service
Box 3, GPO
Adelaide, South Australia 5001
*+61 8 8274 0384
fax +61 8 8271 0758
* [EMAIL PROTECTED]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Continuing Long Lines

2006-08-24 Thread Bruce Nichol

Goo'day,

At 11:01 25/08/06 +0800, you wrote:


One way to break up a large condition is to do something like this...

COND1 = (condition1 OR condition2)
COND2 = (condition3 OR condition4)
COND3 = (condition5 AND condition6 AND condition7)
IF COND1 OR COND2 OR COND3 THEN...

You could make the variables COND1, COND2, etc. meaningful (like
AMOUNT.TOO.LARGE, OVER.LIMIT, WRONG.SUBURB).


Wouldn't this look much cleaner and neater (not to say more understandable) 
with CASE statements?



Regards,

Bruce Nichol
Talon Computer Services
ALBURYNSW 2640
Australia

http://www.taloncs.com.au

Tel: +61 (0)411149636
Fax: +61 (0)260232119

If it ain't broke, fix it till it is! 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.405 / Virus Database: 268.11.6/427 - Release Date: 24/08/06
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Continuing Long Lines

2006-08-24 Thread Womack, Adrian
The original poster was asking about a single IF statement and how to
split it into several lines, I don't think using a CASE structure would
solve this particular problem.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bruce Nichol
Sent: Friday, 25 August 2006 11:42 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Continuing Long Lines

Goo'day,

At 11:01 25/08/06 +0800, you wrote:

One way to break up a large condition is to do something like this...

COND1 = (condition1 OR condition2)
COND2 = (condition3 OR condition4)
COND3 = (condition5 AND condition6 AND condition7) IF COND1 OR COND2 OR

COND3 THEN...

You could make the variables COND1, COND2, etc. meaningful (like 
AMOUNT.TOO.LARGE, OVER.LIMIT, WRONG.SUBURB).

Wouldn't this look much cleaner and neater (not to say more
understandable) with CASE statements?


Regards,

Bruce Nichol


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/