Lua Block Comments don't work
Posted: Tue Jun 17, 2014 5:03 pm
I'll first say that, with the as-supplied settings in Tools-Options-Keywords it has never worked right for me either in 3.97c or 3.97s. I won't go into details on that, but the options that work for me in 3.97c are:
Start: --[ End: ]] Line: --
Comment Details #2: blank
This has worked for me for over 4 years and many thousand lines of code.
If Comment Details #2 are [[, ]] (as supplied) it's not right.
The way it should work is spelled out in "Programming in Lua" pg 6 and here are 2 test cases:
#1:
--[[
A=B
--]]
B=C
#2:
---[[
A=B
--]]
B=C
In #1 the A=B line should be a comment (italics in magenta) and the B=C line is not a comment (black)
In #2 both the A=B and B=C should be executable (and in black)
It works this way (i.e. correctly) for me in 3.97c (with the modified options as shown above).
In 3.97s, however (with the same modified options), in #1 both the A=B and B=C lines show as comments (italics in green). In #2 A=B shows as a comment (italics in green) where it should be black; B=C does (correctly) show black. So, neither is correct.
I've tried other combinations of the options in 3.97s (including those as supplied) and have been unable to make it work correctly. (Note that I installed 3.97s on a separate machine that has NOT had Zeus on it before and does not have Lua on it at all and these results were identical to my production machine.)
Just to be absolutely clear, here is the way it is in 3.97c (correct):
#1:
--[[
A=B
--]]
B=C
#2:
---[[
A=B
--]]
B=C
and in 3.97s (incorrect):
#1:
--[[
A=B
--]]
B=C
#2:
---[[
A=B
--]]
B=C
Start: --[ End: ]] Line: --
Comment Details #2: blank
This has worked for me for over 4 years and many thousand lines of code.
If Comment Details #2 are [[, ]] (as supplied) it's not right.
The way it should work is spelled out in "Programming in Lua" pg 6 and here are 2 test cases:
#1:
--[[
A=B
--]]
B=C
#2:
---[[
A=B
--]]
B=C
In #1 the A=B line should be a comment (italics in magenta) and the B=C line is not a comment (black)
In #2 both the A=B and B=C should be executable (and in black)
It works this way (i.e. correctly) for me in 3.97c (with the modified options as shown above).
In 3.97s, however (with the same modified options), in #1 both the A=B and B=C lines show as comments (italics in green). In #2 A=B shows as a comment (italics in green) where it should be black; B=C does (correctly) show black. So, neither is correct.
I've tried other combinations of the options in 3.97s (including those as supplied) and have been unable to make it work correctly. (Note that I installed 3.97s on a separate machine that has NOT had Zeus on it before and does not have Lua on it at all and these results were identical to my production machine.)
Just to be absolutely clear, here is the way it is in 3.97c (correct):
#1:
--[[
A=B
--]]
B=C
#2:
---[[
A=B
--]]
B=C
and in 3.97s (incorrect):
#1:
--[[
A=B
--]]
B=C
#2:
---[[
A=B
--]]
B=C