Issue 61389 - Basic put statement writes wrong, if used with literals
Summary: Basic put statement writes wrong, if used with literals
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-30 19:23 UTC by Regina Henschel
Modified: 2017-05-20 11:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2006-01-30 19:23:42 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.
Comment 1 Olaf Felka 2006-01-31 08:32:41 UTC
@ jsk: Please have  a look.
Comment 2 joerg.skottke 2006-04-25 12:17:22 UTC
to ab, target 2.0.4, p3
Comment 3 ab 2006-05-15 14:21:19 UTC
-> OOo 2.x, started
Comment 4 Mathias_Bauer 2007-12-04 14:57:36 UTC
basic and scripting issues now should be assigned to component "scripting"
Comment 5 Martin Hollmichel 2007-12-07 12:13:36 UTC
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Comment 6 Marcus 2017-05-20 11:27:46 UTC
Reset assigne to the default "issues@openoffice.apache.org".