Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Equations Operators

Status
Not open for further replies.

overkill04

Mechanical
Joined
May 9, 2005
Messages
93
Location
CA
Hi all

Just wondering what an easy way to perform an odd or even check would be in the equation editor.

eg. if "xxxx" is positive then ....
else negative then ....

Thanks



Specs, Intel Pentium M 2.16 Mhz
SW 2007 R2.2
1.5 Gb Ram
NVidia GE Force GO 6800 256Mb
 
The iif function can be used to return different values based on a condition. So to get a different value if xxx is odd than if it is even try:
Code:
iif(("xxx" mod 2) like 0, even_value, odd_value)

Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top