[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Using the cond function wit



I am using the following code on an Unix machine with SQR 3.0.5.  I get the
following error message:

begin-report
    let #t1 = 0.0
    let #val = cond(trunc(#t1,0) = 0,0,90/#t1)
    display #val
    if #t1=0
        let #val = 90
    else
        let #val = 90/#t1
    end-if
    display #val
end-report
~

Error on line 3:
   (SQR 4029) Attempting division by zero in expression.

If I use the 'if' statement then the code works.

Any suggestions please!