STRING * n support in StarBasic
Noel Power
nopower at suse.com
Mon Oct 29 03:07:41 PDT 2012
Hi Norbert,
sorry I am late to this, extra conference, travelling etc.
On 25/10/12 13:47, Norbert Thiebaud wrote:
> On Thu, Oct 25, 2012 at 10:56 AM, Michael Stahl <mstahl at redhat.com>
> wrote:
>> if we simply replace the existing String uses with OUString we don't
>> have to worry about that any more :)
that would be my hope
> Well, you do need to worry, if you want to enforce the language spec
> (although these are pretty weak and fuzzy)
that's unfortunately typical with MS vba
> Right know we seems to care about padding of fixed-length String on
> Init only (Dim)... I have not stumbled upon code that cares about that
> on assign and other manipulations... iow Dim foo as STRING*10 = "" dim
> bar as STRING "hello" foo = bar what should be foo? "hello" or "hello
> " This is probably not a 'generaly' solvable problem as this notion of
> fixed-size has been dropped post VB6.0, and now everything is var-len
> with a max at 2GB. iow old and new spec conflict. So I guess my
> question is: while migrating to OUString, should we care about the
> corner-case and other oddities associated with 'fixed' String.
I would say no ( otherwise some support for fixed strings would need to
be introduced for unknown if any benefit ), in fact a quick test on
master and 'Dim bar as STRING "hello"' doesn't even compile, I would
guess this feature has been broken for probably years ( personally never
heard of this syntax before ) - need to get some idea how long it is
broken though ( I will check soon )
btw for your question "what should be foo? "hello" or "hello "
yeah, I guess if we did things properly imho the latter would be correct
( should again check that with ms vba )
> Norbert
so for me it seems the best course of action is to just solve this in
the limited case ( e.g. just transition to oustring without considering
the 'other' string manipulations ) I will try and find out how long this
is broken, that should influence whether we decide to even drop this (
most likely not even used ) functionality
Noel
More information about the LibreOffice
mailing list