ChardScript Comments
Creating a Comment
# This is a comment
echo("Hello World!")echo("Hello World!") # This is a comment# echo("Hello World!")
echo("Comment will not work!")Multi Line Comments
Last updated
Comments can be used to explain ChardScript code, make the code more readable and prevent execution when testing code.
Comments starts with a #, and ChardScript will ignore them:
Example
# This is a comment
echo("Hello World!")Comments can be placed at the end of a line, and ChardScript will ignore the rest of the line:
Example
echo("Hello World!") # This is a commentA comment does not have to be text that explains the code, it can also be used to prevent ChardScript from executing code:
Example
# echo("Hello World!")
echo("Comment will not work!")ChardScript does not really have a syntax for multi line comments.
To add a multiline comment you could insert a # for each line:
Example
Last updated
# This is a comment
# written in
# more than just one line
echo("Hello, World!")