You can edit almost every page by Creating an account and confirming your email.

Nemo (programming language)

From EverybodyWiki Bios & Wiki


Nemo
Paradigmimperative, procedural, structured
Designed bySzymon Urbaś
DeveloperSzymon Urbaś
First appeared2012
Preview release
0.21.0 / August 24, 2013 (2013-08-24)
Typing disciplineStrong, static
Implementation languageC
OSLinux
LicenseX11 License[1]
Filename extensions.nm
Websitegithub.com/semahawk/nemo/
Influenced by
Perl, C, Unix shell

Search Nemo (programming language) on Amazon.

Nemo is an interpreted, general-purpose, high-level programming language.

It is named after Captain Nemo as seen in Twenty Thousand Leagues Under the Sea by Jules Verne

Syntax

Hello, world

The most basic program in Nemo (and probably any other language out there) - hello world - looks like this:

print("hello, world\n");

One of Nemo's features is that there is really no need for parentheses in a function call. That said, the above could look like this:

print "hello, world\n";

Comments

Nemo supports two types of comments.

One line

# I'm a comment

Multi line

/*
 * I'm a multiline comment
 */

Data types

Int

For now, the only supported ints are in base of 10 and are what you would expect an int to be.

2
42

Float

2.71
3.14
2.   # equivalent to 2.0
.5   # equivalent to 0.5

String

As you could see in the Hello, world example, there are strings. Note: there is no support for Unicode.

"hello, world"
"ahoy\rhello\n"

Array

[]
[1, 2, 3, 4]

Note: Array elements can be of any type.

[1, 1.4, "hello"]

Bool

There really is no "bool" type. The things that are considered "false" in Nemo are: integer 0, floating-point 0.0, an empty string ("") and an empty array ([]).

Control structures

One of the things that distinguish Nemo from other languages is the control structures. Most languages define them as such:

if/while (<expr>) <stmt>

Whereas in Nemo, it goes like this:

if/while <stmt> <stmt>

The second statement gets executed when the first statement evaluates as "true". Note: apart from if and while there are also unless and until structures.

References

  1. "Nemo license".


This article "Nemo (programming language)" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.