Decimal separator and 4GL_NUMERIC
Alessandro Vercelli <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
we are building an application which uses decimal numbers but something is not going as expected.
Aubit4GL version is 1.2.38, binary installation on Ubuntu 12.04 32 bit.
In detail, we tried to obtain numerical output with two decimal and comma separator with the following code:
::::::::::::::
formtest.4gl
::::::::::::::
main
DEFINE l_sai decimal(8,2)
OPEN WINDOW w_test AT 2,1 WITH FORM "formtest"
ATTRIBUTE(PROMPT LINE FIRST, MESSAGE LINE 2, COMMENT LINE LAST)
let l_sai = 123.45
while true
input by name l_sai without defaults
after input
display by name l_sai
end input
sleep 1
end while
close window w_test
end main
::::::::::::::
formtest.per
::::::::::::::
DATABASE FORMONLY
SCREEN
{
xxxxxxxxxxxxxxxxxxx
Test [a ]
xxxxxxxxxxxxxxxxxxx
}
END
ATTRIBUTES
a = FORMONLY.l_sai;
END
INSTRUCTIONS
DELIMITERS " "
END
When ran, if input is 44738, then output is
xxxxxxxxxxxxxxxxxxx
Test 44738.00
xxxxxxxxxxxxxxxxxxx
instead of 44738,00 as desidered.
We made several attempt with:
A4GL_ALLOWCOMMAINDECIMAL=Y (tried with or without)
A4GL_NUMERIC=,. (also tried . or , or ., or disable)
LANG=it_IT.UTF-8 (tried with or without)
in $AUBITDIR/etc/aubitrc without any change in output, it seems these variables do not have any effect.
Any help appreciated, thanks anyone
Alessandro
------------------------------------------------------------------------------