Apache OpenOffice (AOO) Bugzilla – Issue 61389
Basic put statement writes wrong, if used with literals
Last modified: 2017-05-20 11:27:46 UTC
Compare the macros (1) Dim iNumber as integer Dim iwert as integer Dim sfile as string sFile="c:\daten.txt" iNumber=FreeFile open sfile For Random As iNumber len=2 iwert=234 Put #iNumber,1,iwert close #iNumber (2) Dim iNumber as integer Dim iwert as integer Dim sfile as string sFile="c:\daten.txt" iNumber=FreeFile open sfile For Random As iNumber len=2 Put #iNumber,1,234 rem also wrong with Cint(234) close #iNumber Macro (1) creates a file with EA 00, Macro (2) creates 02 00 EA 00, which has two additional bytes. The same error occurs, if you use strings. Put-statement with constant "ab" creates 08 00 02 00 61 61, which are two additional bytes, compared with using a variable with value "ab" which gives 02 00 61 62. The behavior of (1) is correct and can be read back with get.
@ jsk: Please have a look.
to ab, target 2.0.4, p3
-> OOo 2.x, started
basic and scripting issues now should be assigned to component "scripting"
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Reset assigne to the default "issues@openoffice.apache.org".