Le 23/06/22 à 16:23, Dave a écrit :
Like Pedro, I can replicate your issue, but cannot explain it, other
than to say it might be that the function is seeing 123D456 as a Hex
value, which equates to Decimal 19.125.334.
Dave,
the problem then is that 'A', 'B', 'C' and 'F' are not accepted
Only 'D' and 'E' are accepted :
- 'E' probably stands for Exponent, thus is should be valid character in
the numeric string
- 'D' : something like "Decimal" ?
- in fact, as Basic states it is a number, I tried to print it out :
-> msgbox CLng("123D456") : raises an error stating an overflow
-> msgbox CDbl("123D456") : enters an infinite loop and you must
terminate the program to exit from this loop
-> msgbox CDec("123D456") : prints the value zero (0)
- I note that msgbox ("123D-456") also returns True : 'D' seems thus to
behave like an exponent.
Power of 10 maybe ?
- lets test msgbox("123D3") : it prints out 123000 ; it seems thus
perfectly equivalent to "123E3"
Note that msgbox CDbl("123D3") does not loop but prints out 123000
Is that a relic from prehistoric ages ?
Lucien.
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org
For additional commands, e-mail: qa-h...@openoffice.apache.org