[Gambas-user] a) Val("15911.23046875") fails in Xub16.04 only, b) no tabstop in messages
ub2 at gmx.ch
ub2 at gmx.ch
Sat Sep 26 15:10:41 CEST 2020
Dear Gambas Cracks
(2nd try, seems that 1st mail was not sent within the list)
a) Val("15911.23046875") fails in Xub16.04LTS:
After Update 3.15.2 below given example fails in Xubuntu 16.04LTS but
not in 18.04LTS. Both with same localization (I believe).
Did something change with Val("15911.23046875") in 3.15.2 ?
Some hints how to use Val() more robust?
(eg: Is there a way to force string-convertion to a certain type?
Let's say: Always convert to a float, never to a date.)
b) No tabstop in Messages:
\t does not work in Messages (anymore or never before)?
Sb out there having the same problem ?
Any feedback would be welcome.
Thanks and have a good WE
ub2
---------------------------------------------------------------------
example:
Dim $RamInst_str$, $RamInUse_str$, $RamAvail_str$, $MsgTxt$ As String
Stop 'Fail in Xub1604LTS after Upd Gambas 3.15.2
'Fail in Val("15911.23046875") <<<<====
$RamInst_str$ = "15911.23046875"
$RamInUse_str$ = "12345.0"
Stop 'Fail: Val($RamInst_str$)
$RamAvail_str$ = Val($RamInst_str$) - Val($RamInUse_str$)
'ok with Xub16.04LTS + Gambas 3.15.1,
'FAIL* with Xub16.04 LTS + 3.15.2
'ok with Xub18.04LTS + Gambas 3.15.1
'ok with Xub18.04 LTS + 3.15.2
'*Fail 1: Typenunverträglichkeit:
' Erwartet Number, statt dessen Null erhalten
$MsgTxt$ = "Check RAM:\n"
"+ Installed: " & "\t+ " & CStr($RamInst_str$) & "\n"
"- In use : " & " \t- " & CStr($RamInUse_str$) & "\n"
"= available : " & "\t= " & CStr($RamAvail_str$) & "\n"
Message.info($MsgTxt$)
'"Fail" 2: \t not working inside MessageBox (anymore? since Ver?)
$MsgTxt$ = "<pre>" & $MsgTxt$ & "</pre>"
Message.info($MsgTxt$) '\t ok
[System]
Gambas=3.15.2
OperatingSystem=Linux
Kernel=4.4.0-190-generic
Architecture=x86_64
Distribution=Ubuntu 16.04.7 LTS
Desktop=XFCE
Theme=gtk
Language=de_DE.UTF-8
Memory=15911M
More information about the User
mailing list