Nemerle Flashcards
(25 cards)
Who created Nemerle?
Kamil Skalski, Michał Moskal, Prof. Leszek Pacholski, Paweł Olszta
When did it first appeared?
2003
Nemerle Latest Version
v1.2.507.0 (August 6, 2016)
Nemerle Program Paradigm
Multiparadigm (supports functional, imperative, and object-oriented programming)
Type system
Strongly Type
ways to implement constant in Nemerle
using “def”
Construct a constant in Nemerle using def
def Pi: double = 3.14159;
true or false. variables in nemerle are immutable
false
use to define variable in nemerle
def
construct a variable with the value 5
def a = 5
2 types of variable in nermele
Mutable
Normally defined
nemerle is staticaly type
true
inline comment in nemerle
//
multiline comment in nemerle
/* */
escape sequence in nemerle
\n (newline), \t(tab), (backslash), “(double quote), ‘ (single quote)
Delimeter in Nemerle
curly brace ({}) - block of code
parentheses (()) - group of expression
true or false. parentheses are use to separate block of code in nemerle
false
true or false. nemerle follows the standard text formatting, Keywords and identifiers are case-sensitive, and while indentation is not strictly required, it is widely used to improve readability.
true
construct an array in nemerle with an index of 10
mutable numbers : array[int] = arrayint;
construct a record in nemerle
record person(name: string, age : int)
true or false. Semicolon are used to terminate statements. In nemerle semicolon are optional
true
construct a code that prints hello world in nemerle
class myProgram{
static main() : void{
}
}
Console.WriteLine(“hello world”);
true or false. nemerle does not have a goto statement
false
construct a multiway selection statement in Nemerle
match(x){
case(1)=> Console.WriteLine(“one”);
case(2)=> Console.WriteLine(“two”);
default=> Console.WriteLine(“other”);
}