Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: aritmetic operators fire error with nulls data
Message
From
13/12/2004 12:55:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: aritmetic operators fire error with nulls data
Miscellaneous
Thread ID:
00968819
Message ID:
00968819
Views:
62
Previous issue Thread #968242

Bug/Issue : 29 of 49

TITLE: BUG : aritmetic operators fire error with nulls data

VERSION: 09.00.0000.1720 and previous

EXPECTED: return NULL without check the data type of variables

OBSERVED:
- logical expressions don't check type of elements
- change sign of a logical null return null
- +-*/^% fire a error with nulls

REPRO:
  x=null
  * Expected NULL Observed NULL
  ? NULL = x
  * Expected NULL Observed NULL
  ? NULL + x
    * Expected NULL Observed NULL
  ? -X        && - (Logical null)
  * Expected NULL Observed Error => Bug
   ? 0-X   
  
  y=3
  y=null
  
  * Expected NULL Observed NULL
  ? Y= X && (numeric null) = (Logical null)
  * Expected NULL Observed NULL
  ? Y AND X  && (Logical null) AND (numeric null)
  * Expected NULL Observed Error => Bug
  ? y - X  && (numeric null) - (Logical null)
Effect :
If you write a polimorphic method with a variant parameter,
the inner code have to cast the null value before to use it.
Reply
Map
View

Click here to load this message in the networking platform