Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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
May 9, 2005
93
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
 
Replies continue below

Recommended for you

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