Issue 41695 - Basic instruction Get produces a syntax error
Basic instruction Get produces a syntax error
Status: CLOSED FIXED
Product: udk
Classification: Code
Component: code
OOo 1.1.4
All All
: P3 trivial with 1 vote (vote)
: OOo 1.1.5
Assigned To: joerg.skottke
issues@udk
:
: 38452 (view as issue list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-31 10:43 UTC by bmarcelly
Modified: 2005-11-08 12:25 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bmarcelly 2005-01-31 10:43:50 UTC
Since OOo 1.1.4 and up to 1.9 the Basic language instruction Get produces
Basic syntax error Unexpected symbol Get
in situation where the syntax is apparently correct.

Reproduceable with this dummy routine
Sub testGet
rem this instruction should not create a syntax error
Get #1, 1, v
End Sub
Compile the module : no error in 1.1.3 and earlier, syntax error in 1.1.4 and in 1.
9m65.
Reported to work again in 1.9m74.
Comment 1 andrew 2005-01-31 23:12:13 UTC
You were correct Bernard, this is the same issue......

http://qa.openoffice.org/issues/show_bug.cgi?id=39615
Comment 2 kay.ramme 2005-02-01 17:12:19 UTC
Andreas, if this is double, please close it.
Comment 3 ab 2005-02-04 10:53:21 UTC
1.1.4 regression, easy to fix -> OOo 1.1.5 (already fixed for 2.0 in #37363)

Comment 4 ab 2005-04-05 14:33:21 UTC
*** Issue 38452 has been marked as a duplicate of this issue. ***
Comment 5 ab 2005-04-21 12:46:51 UTC
Fixed
Comment 6 ab 2005-04-29 10:51:58 UTC
ab->jsk: Please verify


re-open issue and reassign to jsk@openoffice.org
Comment 7 ab 2005-04-29 10:52:09 UTC
reassign to jsk@openoffice.org
Comment 8 ab 2005-04-29 10:52:18 UTC
reset resolution to FIXED
Comment 9 joerg.skottke 2005-06-06 13:48:26 UTC
Tested 

sub test

    dim F as string
    dim S as string
    F = "/export/home/autojsk/test.txt" 
    Open F for random as #17

    get #17, 1, S
    msgbox( S )

end sub

Works ok, verified.
Comment 10 user967 2005-08-31 20:27:22 UTC
Perhaps I have missed something in the bug reports, but I am using OO 2.0-pre
(build 1.9.110 installed with SuSe 9.3 Pro), and this bug is still present.

The get statement produces a syntax error (using it with a binary file, haven't 
tested with random).  Also, when I switch back to the oocalc window, the syntax 
error keeps popping up in both the oocalc and basic windows repeatedly, so fast 
that the only way to regain control is to kill soffice.

Related: the "line input" command fails to return an error when it encounters 
binary (non-text) data.  Instead, when running in an oocalc macro, the basic 
window will open with the "line input" command highlighted, but with no error 
displayed.  This is even the case when it is within an error trap.  The error is 
not trapped.

For example, consider if the "test.htm" file is corrupt and incorrectly begins 
with these bytes: 0x1F 8B 08 00 00

on error goto errx
open "test.htm" for input as 1   'same result if opened as binary
line input #1, a
close 1

In my thinking it should return an I/O error (which would be trapped).  As it 
stands, there is no way to trap it and the macro stops.  With the get command 
missing, there is also no way to read the file and verify it is a text file.

Comment 11 user967 2005-08-31 23:16:21 UTC
I now realize I should have put the 'line input' problem in a separate issue.  
For the curious, I now believe that problem may be related to these issues I 
have reported:
[Issue 54060] New - Basic On Error does not reset for second error handler
[Issue 54065] New - Basic error produces no error message pop-up
Comment 12 joerg.skottke 2005-11-08 12:25:20 UTC
Close, this works in master build