Date variables (OSF/1)
Posted in 1993
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I detected the follow bug: If someone calls a function with a null date variable as argument, the corresponding parameter is not null. Follows a small program to demonstrate the problem. {--------------------------------------------------} main define d date let d = null call f( d) end main function f(d) define d date if d is null then display "d is null" else display "d is not null" end if end function {--------------------------------------------------} That program has the output: d is not null This problem happens only in Alpha machines (OSF/1) where the long variables has 8 bytes length and int variables only 4. If, in the generated C code, we put a printf() of the date, we obtain: 0xffffffff80000000 -> after ' let d = null ' 0x80000000 -> in function f() Is this a known bug ? Is it a safe workaround to put, after each generated C call to popdate(), the code ' if (thedate == 0x80000000) thedate = 0xffffffff80000000 ; ' ? Is there any other workaround ? The environment is: Operating System OSF1 T1.3 80.2 alpha INFORMIX-4GL Version 4.10.UE2 INFORMIX-OnLine Version 5.00.UD1 Thanks. ------------------------------------------------------------------------------ | Carlos Ponte | | S.S.F. - Servicos de Software Financeiro, Lda VOICE: +351 (1) 720-5000 | | Estrada da Luz 104, Loja A FAX: +351 (1) 720-5090 | | 1600 Lisboa E-MAIL: cmp@ssf.pt | | PORTUGAL | ------------------------------------------------------------------------------