in reply to Re^2: Testing For Numberness Vs Stringness
in thread Testing For Numberness Vs Stringness

Have sepperate functions for numeric vs stringy tests, then. The answer to "is 03 the same as 3" depends on intentions, and not any occult flags of the 3.0 and the 3 that your program could concivably read.

  • Comment on Re^3: Testing For Numberness Vs Stringness

Replies are listed 'Best First'.
Re^4: Testing For Numberness Vs Stringness
by BrooklineTom (Novice) on Nov 29, 2004 at 13:12 UTC
    When a test routine is recursing its way, scalar by scalar, through a possibly unknown data structure -- such as during a deep compare -- it can't decide whether to use a numeric vs stringy test. There are no "intentions" to know, and no metastructure (occult or not) to consult. Fortunately, as bgreenlea showed in his or her reply, no "occult flags" are needed -- the bit-by-bit comparison does the trick.