Hi Laurent,
Alle 14:54, venerdì 23 giugno 2006, Laurent Godard ha scritto:
> Hi
>
> > Meanwhile I encountered that you can't have/use a number that is
> > outside int32 range but still inside the int64 range, for example
> > Sub hyper
> > x = CreateUnoValue("hyper", 9223372036854775806)
> > End Sub
> >
> > will give an error, yet the numeric constant is still inside the range
> > a variable of type hyper can take. the question now is:
> > What happens with such big numbers (as above) that are transfered from
> > a UNO function to Starbasic, like the getLength() function for ucb
> > file objects.
>
> perharps a dummy question
> what about double type or currency one ?
> does it cover ?
> not sure they are compliant though
In practice yes, you can use these types but:
1) when you have to pass the value to an api method that requires an hyper
(seek / writeSomeBytes/ etc.) you still must use the createUnoValue function
2) In theory there is a precision problem using a Basic double to represent an
UNO hyper:
for example, this would not happen using the hyper or the int64 (I think) :
sub testDouble
x = 9.987654321e15
y = x - 1
z = x - y
print z '0
end sub
In practice I can't imagine any use cases (in StarBasic) where one needs of
the unit precision with numbers >10^16
Anyway the StarBasic engine, internally already recognizes the int64 type, so
why not make it possible to declare it explicitally ?
This would avoid the use of the createUnoValue function
regards
Paolo M
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]