This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
RoD's profile picture

Syntax highlighting

Started by RoD, 15 April 2014 - 04:19 PM
RoD #1
Posted 15 April 2014 - 06:19 PM
I have seen some posts and people often leave their codes in their posts, using the forum BBcode. Now, whenever someone uses ' in a comment it will stay green until the end of the code like here:

function test()
   print("Heyy")
   local var = "lol"
   print(var) -- You can't do that
   print("I am all green")
end

The same happens with the # sign i belive.
Will this be fixed? I mean, in my notepad++ it stays with other color as well but if i change the line and leave it only with one ' with will assume as a normal string and set it to the string highlight color.
Edited on 16 April 2014 - 01:46 PM
MKlegoman357 #2
Posted 15 April 2014 - 07:10 PM
I often use Java/C and other programming language's comments after I declair Lua's comments:


if term.isColor() then --// if the computer support colors
  term.setTextColor(colors.yellow) --// change text color to yellow
end
theoriginalbit #3
Posted 16 April 2014 - 12:32 AM
I commonly use

--# comment
Agoldfish #4
Posted 16 April 2014 - 12:54 AM
I commonly use

--# comment
Same here.
RoD #5
Posted 16 April 2014 - 03:47 PM
Yet, i usually post my codes and i use the – for commenting and i am not used to # everytime i want to comment :P/>
Cranium #6
Posted 16 April 2014 - 04:39 PM
That's understanable, but unfortunately, it's not something that is likely to change unless Dan adds the Lua module that is available for IP.Board.