Bug 112114 - Using '#' symbol as comment prevent to assign integer variables
Summary: Using '#' symbol as comment prevent to assign integer variables
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-30 17:06 UTC by oleyansen
Modified: 2017-08-31 09:17 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test program with results (83.95 KB, image/png)
2017-08-30 17:07 UTC, oleyansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oleyansen 2017-08-30 17:06:43 UTC
Description:
Seems in LibreOffice Basic editor starting from version 5.4.0.3 symbol # considered as comment line.
However this symbol used in BASIC code as integer variable mark.

So previously worked construction like that
#iFile = Freefile()
suddenly stop to work in my BASIC code.

Is it possible to not use # as comment line symbol so my code will continue to work?

Steps to Reproduce:
1.Open LibreOffice Basic editor (Tools - Macros - Organize Macros - LibreOffice Basic)
2. Enter simple test program
name = "/tmp/file.txt"
#iFile = FreeFile()
Open name for Output Access Write As #iFile
Print #iFile, "TEST"
Close #iFile
3. Run program

Actual Results:  
Error Window containing text 
BASIC runtime error.
Invalid file name or file number
appear

Expected Results:
Test program should work


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Comment 1 oleyansen 2017-08-30 17:07:32 UTC
Created attachment 135876 [details]
Test program with results
Comment 2 oleyansen 2017-08-31 09:17:10 UTC
As stated in comment #8 for related issue:
https://bugs.documentfoundation.org/show_bug.cgi?id=93727#c8

'Note: as suggested by OP, # is not a comment marker in VBA. Excel2003's compiler complains as you type #x = 1. Thus, these functions are invalid code.'

So seems this is my Basic code is invalid.
I will change it accordingly and close this issue as invalid.