Euphoria is a programming language that is fast and easy-to-understand. It allows us to learn syntaxes and particular ways of doing things. One of these particular ways is writing comments.
A comment in any programming language is a simple explanatory note that is added in the program and that the computer system does not execute while the program is running.
The usefulness of inline comments in a program cannot be overemphasized. The documentation of a program is said to start from the inline comments. It also encourages collaboration and eases the workload that is associated with debugging.
In Euphoria, programming comments are written in the three of the following methods:
#!
)These types of comments can only be written at the beginning of the program and start with the #!
symbol.
For example:
#! enter comments here
--
) characterThis is another way of writing comments in Euphoria, where the comments are written inside a double dash pair, like this:
-- enter comments here --
--
can be used anywhere in the program code and supports single line commenting only.
The comment styles discussed so far are only for single-line comments. When we wish to have a comment that will run into several lines, we must use the multi-line comment style. In this style, we start the comment with the slash and asterisk characters (/*
) and end it with an asterisk and slash character (*/
).
For example:
/* This is a
multi line comment
*/
RELATED TAGS
CONTRIBUTOR
View all Courses