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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to