Closed Bug 114761 Opened 23 years ago Closed 23 years ago

trivial never-false conditions in Rhino shell

Categories

(Rhino Graveyard :: Compiler, defect)

x86
Windows NT
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: rokicki, Assigned: norrisboyd)

Details

The following code appears twice in tools/shell/Main.java: double d = cx.toNumber(args[i]); if (d != d) usage(arg); It is probably intended to be if (d != (int)d) -tom
Actually, this is correct code. For a double d, the expression d != d is true iff d is a NaN. The NaN value is what is returned if there is an invalid string passed into Context.toNumber.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Marking Verified -
Status: RESOLVED → VERIFIED
Targeting as resolved against 1.5R3
Target Milestone: --- → 1.5R3
You need to log in before you can comment on or make changes to this bug.