[Libreoffice-bugs] [Bug 136032] New: Basic Compiler Bug - incorrect syntax error message - Print #iNumber, "#"

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 23 06:46:39 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=136032

            Bug ID: 136032
           Summary: Basic Compiler Bug - incorrect syntax error message -
                    Print #iNumber,"#"
           Product: LibreOffice
           Version: 6.4.5.2 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: HansWernerHerold at t-online.de

Description:
Print to file > print #iNumber,"#" < causes syntax error message "Inadmissible
value or data type. Data type mismatch.", but there's no syntax error. When
coding
> print #iNumber, "#" < (inserted additional blank after comma) no syntax error message is to bee seen. Important: The described error only occurs when the char to be printed to file is "#" !

Steps to Reproduce:
1. Start macro below as is.
2. Remove ' before Print and start macro below again.

Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim aFile As String
aFile = "c:\data.txt" ' May be necessary to be modified !
iNumber = Freefile
Open aFile For Output As #iNumber
Print #iNumber, "#" ' O.K.
'Print #iNumber,"#" ' Incorrect syntax error message !!!
Print #iNumber, "A#B" ' O.K.
'Print #iNumber,"A#B" ' Incorrect syntax error message
Print #iNumber, "AB" ' O.K.
Print #iNumber,"AB" ' O.K.
Close #iNumber
End Sub

Actual Results:
> Print #iNumber,"#" < and > Print #iNumber,"A#B" < cause syntax error message.

Expected Results:
> Print #iNumber,"#" < and > Print #iNumber,"A#B" < should not cause syntax error message.


Reproducible: Always


User Profile Reset: No



Additional Info:
Tested using LO6.4.6.2(x64)/LO7.0.0.3(x64) @ Windows10Home(x64).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200823/b2b6625a/attachment.htm>


More information about the Libreoffice-bugs mailing list