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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shorten expression

Status
Not open for further replies.

TheConeHead

Programmer
Joined
Aug 14, 2002
Messages
2,106
Location
US
brain... not... working... must... ask... help...

for some reason I can not think how to shorten this:

if (gcounter/12 == 10 || gcounter/12 == 20 and so on and so on) {

any help?
 
the ole noodle has kicked in... this is what I am doing:

if (gcounter/120 == int(gcounter/120)

simple, huh?

oh well....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top