|
![](/i/fill.gif) |
Warp wrote:
>> #if ((0.25 < clock) & (clock < 0.75))
>
> The problem with that is that it's hard to understand.
One you get used to it, you read it as "clock is between 0.25 and 0.75."
> People don't say nor think "is 25 smaller than the money I have?" but
> they always think the other way around. That's why writing things like
> "if (25 < money)" makes code confusing.
Read it "is my money more than 25?" Ignore the < vs >, and read the
order the variables are in. Like the "number line" you learned in grade
school. It's really not any more confusing than starting to count at
zero and continuing while less than your limit. Once you get used to it...
It especially helps when working with time and timestamps, I find.
Whatever's on the right is later, whatever is on the left is earlier.
--
Darren New / San Diego, CA, USA (PST)
Luke, the Force is a powerful ally,
second only to The QuickSave.
Post a reply to this message
|
![](/i/fill.gif) |