Tutorial - assigment Flashcards
1
Q
declare it a new local or global variable
A
var x, y: int
2
Q
assigns 3 to the variables x
and y
A
var x, y = 3
3
Q
The compiler must be able to … in a constant declaration at compile time
A
It must be able to evaluate the expression in a constant declaration at compile time
4
Q
What is the difference between let and const
A
The difference between let and const is: let introduces a variable that can not be re-assigned, const means “enforce compile time evaluation and put it into a data section”
const input = readLine(stdin) # Error: constant expression expected let input = readLine(stdin) # works