Behavior of boolen test of strings
Gjerstad, Øyvind <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
We have some Informix 4gl code which uses character strings in boolean tests, i.e:
if char_variable then
# something
end if
And the expected result is that when the string has any value, it evaluates to true. This works differently in Aubit 4gl. Apparently this expression is only true in Aubit when the character string can be converted to a number different from 0.
Is this something we just have to live with, and change our programs, or is it a possiblity to change the behaviour in Aubit to work the same way as Informix?
Test program:
main
define p_tst_var varchar(255)
let p_tst_var = arg_val(1)
if p_tst_var then
display "All is well"
else
display "Not so good"
end if
end main
--
Øyvind Gjerstad
Systemkonsulent
M +47 909 41 485
[email protected]<mailto:[email protected]>
___________________
PostNord Logistics AS
T +47 09300
IT og Forretningsutvikling
Øran Vest
Postboks 100
6301 Åndalsnes
www.postnordlogistics.no<http://www.postnordlogistics.no>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss