[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] if statement syntax



If you use parentheses you will be certain as to the order of evaluation
of statements like these.  The innermost parentheses will be evaluated
first, then the next set on out to the outermost ones.  It also makes
your code more readable by someone else. 

E.g. do you mean
if ($HasInactiveRow = 'Y' or $IsResident='N') AND $comment<>'New To
Bldg' 
or 
if $HasInactiveRow = 'Y' or ($IsResident='N' AND $comment<>'New To
Bldg')



-----Original Message-----
From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org] On Behalf Of
Laura Mayer
Sent: Tuesday, October 24, 2006 2:40 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] if statement syntax

Good afternoon,

I'm trying to say 

if $HasInactiveRow = 'Y' or $IsResident='N' AND $comment<>'New To Bldg' 

Does this have to be in parentheses or something for it to evaluate all
together?

Thanks in advance.

Laura


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users