To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=47215
------- Additional comments from [EMAIL PROTECTED] Fri Sep 2 22:22:11 -0700
2005 -------
My example does not work at all under m125 with the code as given. If I prepend
the dot to the structure elements, it works partly.
Try the following modified code, which demonstrates the failures in Len and
With, as well as some other inconsistencies. For example, the Print statements
require me to use the complete structured element name instead of the short form
with just the dot, or I get a runtime error.
REM ***** BASIC *****
REM option explicit ' try it either way :)
Type tUserStruct
sString1 as String * 10
nNumber1 as Single
iNumber2 as Integer
cNumber3 as Currency
bTV1 as Boolean
end type
Sub TestWith
Dim myStruct as tUserStruct, iLen1 as Integer, iLen2 as Integer
iLen1 = Len(myStruct) ' Fails with runtime error, so comment it out to let
the rest run
Print "Structured variable length is "; iLen1
With myStruct
.sString1 = "This is a test" ' this string is too long for the field
and
should truncate
Print .sString1, len(myStruct.sString1)' BUT... it does not, Len
returns 14
.nNumber1 = sqr(3.0)
iLen2 = Len(myStruct.nNumber1)
print .nNumber1, iLen2 'Prints "1.732051 8" but the length should be 4
bytes for a Single
.cNumber3 = 2.23606999 * 2.23606999
Print .cNumber3, len(myStruct.cNumber3) ' prints "5.0000 6", where the
length should be 8 bytes
.bTV1 = (1 < 1) ' FALSE
print .bTV1, len(myStruct.bTV1) ' Prints "False 5" but length should be 2
or 4 (not sure which)
End With
End Sub
See also issues 47214 and 47216
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]