[Libreoffice-bugs] [Bug 143183] Format Basic function needs better description of its 'format' argument
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Jul 7 22:10:14 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=143183
Olivier Hallot <olivier.hallot at libreoffice.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Blocks| |80430
Ever confirmed|0 |1
--- Comment #3 from Olivier Hallot <olivier.hallot at libreoffice.org> ---
The printfmtstr extra codes for strings may return unexpected values if not
carefully coded in Basic
msgbox Format("FooBar", "!!abc") '=> "F" (everything after initial "1" is
discarded)
msgbox Format("123.456", "!") '=> return !
msgbox Format("123.456", "!!abc") '=> return !!abc
msgbox Format("123.abc456", "!!abc") '=> return 1
So, if the string contents is a valid number, the '!' format string return the
format string itself.
otherwise, return the first character of the input string.
Also the "&" format code seems to return the format string itself.
msgbox Format("ADCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", "&abc")
msgbox Format(123.456, "&abc")
msgbox Format("123.456", "&abc")
all return &abc.
Referenced Bugs:
https://bugs.documentfoundation.org/show_bug.cgi?id=80430
[Bug 80430] [META] Documentation gap for new features
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210707/a38f43eb/attachment.htm>
More information about the Libreoffice-bugs
mailing list