Bug or feature: NUMBER_Null + NUMBER_Null = 0 ?

forum.centura.team.developer (1998-2005) & forum.sqlwindows (2000-2005)
StefanM
Germany
Posts: 679
Joined: 10 Aug 2018, 15:57
Location: Bavaria

Bug or feature: NUMBER_Null + NUMBER_Null = 0 ?

Post by StefanM » 21 Feb 2005, 09:51

 Posted by:  Stefan Misch 

Hi,

I would like to get your opinions about that:

Suppose I have two numeric variables nOne and nTwo which are both
NUMBER_Null.
IMHO then nOne + nTwo should result in NUMBER_Null, too.
But in SAL the result is 0 !

Would you consider this a bug or a "feature"?

I could live with the fact, that if one of the variables has a value unequal
NUMBER_Null then the variable having a value of NUMBER_Null is treated as if
its value is 0. Thus you won't need to apply something like
"SalNumberNvl( )".

TIA,
Stefan

Jarmo Muukka

Re: Bug or feature: NUMBER_Null + NUMBER_Null = 0 ?

Post by Jarmo Muukka » 21 Feb 2005, 10:09

 Posted by:  Jarmo Muukka 

I believe that this is a feature. SAL code is not SQL.

JMu

James McCall

Re: Bug or feature: NUMBER_Null + NUMBER_Null = 0 ?

Post by James McCall » 22 Feb 2005, 10:23

 Posted by:  James McCall 

I doubt you could characterise this as a feature, what possible use
would it be?

Furthermore, just because SAL is not SQL doesn't mean it can't borrow
some useful features from SQL.

I would imagine it's just one of those things in a program that the
programmer didn't anticipate and the users (us) haven't stumbled
across or bothered about until now.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3388
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Bug or feature: NUMBER_Null + NUMBER_Null = 0 ?

Post by Dave Rabelink » 23 Feb 2005, 20:25

 Posted by:  Dave Rabelink 

I see it as normal and wanted behaviour.

0 and NUMBER_Null are treated as FALSE and all other values as TRUE.

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests