!English/Comments

From Esolang
Jump to navigation Jump to search

Back to !English

Comments

Single-line

There are 2 syntaxes for single-line comments, either the "English-style" one or the "FORTRAN" one.

English-style syntax example

Save as comments.eng

Ignore this line "How to print Hello, world! in !English"
Print "Hello, world!" and a new line and Ignore this text in quotes "This is a comment"
Ignore this line "End of this program"

FORTRAN syntax example

Save as comments_fortran.eng

! How to print Hello, world! in !English
Print "Hello, world!" and a new line ! This is a comment
! End of this program

Multi-line

There are 2 syntaxes for multi-line comments, either the "English-style" one or the "XML/HTML" one. They quite differ than the single-line ones.

English-style syntax example

Save as comments_multiline.eng

Start of multi-line comment
"This is how you can print
Hello, world! in !English
using the English-style syntax"
End of multi-line comment

Print "Hello, world!" and a new line

Start of multi-line comment
"This is a multi-line comment
It spans on multiple lines
Hello, world?"
End of multi-line comment

XML/HTML syntax example

Save as comments_xml_html.eng

<!-- This is how you can print
Hello, world! in !English
using the XML/HTML syntax -->
Print "Hello, world!" and a new line
<!-- This is a multi-line comment
It spans on multiple lines
Hello, world? -->