Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java or operator statement and expressions

1 view
Skip to first unread message

Rick_...@adobeforums.com

unread,
Feb 21, 2009, 12:32:53 PM2/21/09
to
So I tried to simplify some code this morning using the java or operator and it doesn't seem to work. It went something like this:

if ((time < 4) || (time > 10))}
val = aVariable}
else val=0;

What I end up with is zero until 4 but after 10 the val does not return to 0.

I hope this makes sense to somebody out there. I just went back to a stack of if else statements to solve the problem.

Thanks

Dan_E...@adobeforums.com

unread,
Feb 21, 2009, 3:37:55 PM2/21/09
to
I'm not sure what the problem is (except that your curly brackets are wrong), but this opacity expression works:

if ((time < 4) || (time > 10)){
0
}else{
100
}

Dan

Rick_...@adobeforums.com

unread,
Feb 21, 2009, 6:24:46 PM2/21/09
to
Thanks Dan. That was it.

When I'm coding at 3AM i tend to make silly type-os... and omissions!

Rick

0 new messages