Re: 4GL compares NULL differently
Posted in 2005
Denis Melnikov said: > > 4GL 7.32.UC2 > Solaris 2.6 > > 4GL must compare NULL to any not-NULL value as FALSE. Oh? I always thought you had to explicitly check for nulls. > And it acts this way... sometimes. > > Please review the following sample: > >>>>>>>>>>>>>>>>>>> > DEFINE m_inv_amt DECIMAL(12,2) > > FUNCTION AmtUsed() > > IF m_inv_amt != 0 THEN > RETURN true > ELSE > RETURN false > END IF > END FUNCTION > <<<<<<<<<<<<<<<<<< > > When m_inv_amt is NULL, AmtUsed() returns FALSE at one moment, > and TRUE at another. And the FALSE/TRUE sequence doesn't > change from run to run. > > Is it a known bug or a new feature? > > -- Bye now, Obnoxio "C'est pas parce qu'on n'a rien ` dire qu'il faut fermer sa gueule" - Coluche "You are an index and a prologue to the history of lust and foul thoughts." - William Shakespeare sending to informix-list