Yes 'SET ZERO' is off. My understanding of this feature is to allow 'NULL'
values to be treated as 0.0 not unknown. However, this is not the case. I
pass a known value, 0.0, to BRND and it returns NULL. BRND should return 0.0
when given 0.0 regardless of the SET ZERO setting. BRND should return 'NULL'
when given a NULL and SET ZERO OFF and return '0.0' when given a NULL and SET
ZERO ON.
Further investigation shows that if the value should round to zero, ie,
brnd(0.0001,6,0.01)) it still returns a NULL. This should not be, it should
return a zero.
I will have to throw in another if test because of this behavior where BRND
throws a NULL when given a 0.0 value.
cheers -- Clarence
On 11 May 2001, at 16:48, Frank Radice pondered the following:
> Check your SET ZERO setting. If it is ON, you will get 0. If it is OFF you
> will get a NULL value.
>
> It works this way in both DOS 6.5+ and Windows 6.5+
>
> ---------------------------------------------------------------------------- -
>
> -----Original Message-----
> From: Clarence W. Robison [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 11, 2001 3:46 PM
> To: [EMAIL PROTECTED]
> Subject: Is this correct operation
>
>
> Greetings:
>
> I do not believe that BRND is functioning properly. BRND returns a NULL if its
> arguement is numerically zero. Can someone confirm this?
>
> TIA Clarence
>
> Given the following commands from the R-prompt.
>
> SET VAR vpvalue REAL
> SET VAR vpvalue = 0.1
> SHO VAR vpvalue
> 0.1
> SET VAR vpvalue = (BRND(.vpvalue,6,0.01))
> SHO VAR vpvalue
> 0.1
> SET VAR vpvalue = 0.0
> SHO VAR vpvalue
> 0.
> SET VAR vpvalue = (BRND(.vpvalue,6,0.01))
> SHO VAR vpvalue
> -0-
>
> PS: Version 6.5+ Windows Build 1.839xRT03
>
>
>
> Clarence W. Robison, P.E.
> [EMAIL PROTECTED]
Clarence W. Robison, P.E.
[EMAIL PROTECTED]