Apache OpenOffice (AOO) Bugzilla – Issue 41695
Basic instruction Get produces a syntax error
Last modified: 2005-11-08 12:25:20 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.
You were correct Bernard, this is the same issue...... http://qa.openoffice.org/issues/show_bug.cgi?id=39615
Andreas, if this is double, please close it.
1.1.4 regression, easy to fix -> OOo 1.1.5 (already fixed for 2.0 in #37363)
*** Issue 38452 has been marked as a duplicate of this issue. ***
Fixed
ab->jsk: Please verify re-open issue and reassign to jsk@openoffice.org
reassign to jsk@openoffice.org
reset resolution to FIXED
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.
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.
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
Close, this works in master build