This project is read-only.

Language Basics

To write a program in Mirelle, you don't have to nest the code into classes and methods. A "hello world" application is just as follows:

print "Hello world"

Yeah, that's just it!
In the code above, you can see the print statement and a string constant in double quotes, separated by a space. The statements are separated by a newline, so you might have written in also like this:

print "Hello "
print "world"

This tiny program's purpose can be easily detected at first glance, but as your scripts become bigger, it's a good idea to annotate code with comments. You can use single-line or multi-like comments like in the following example:

// i'm a single-line comment
print "something"

/* and i'm multiline
and I span
and span even more!
print "something else"

Please note that multiline comments cannot be nested!

Mirelle is a case-dependent language. It means that the print keyword cannot be written as Print or PRINT , because the latter two are undefined identifiers.

Next article: Variables

Related articles: Print Operator

Last edited Mar 16, 2011 at 11:13 PM by impworks, version 6


No comments yet.