Category:Elena: Difference between revisions
Content added Content deleted
Line 323: | Line 323: | ||
Usually Boolean expression is a result of a comparison operation: |
Usually Boolean expression is a result of a comparison operation: |
||
program = |
public program = |
||
[ |
[ |
||
console writeLine("Hello!"); writeLine("How are you?"). |
console writeLine("Hello!"); writeLine("How are you?"). |
||
Line 334: | Line 334: | ||
Several conditions can be checked: |
Several conditions can be checked: |
||
program = |
public program = |
||
[ |
[ |
||
console writeLine("Hello!"); writeLine("How are you?"). |
console writeLine("Hello!"); writeLine("How are you?"). |
||
Line 345: | Line 345: | ||
A switch statement can be implemented using => operator: |
A switch statement can be implemented using => operator: |
||
program = |
public program = |
||
[ |
[ |
||
console writeLine("Hello!"); writeLine("How are you?"). |
console writeLine("Hello!"); writeLine("How are you?"). |
||
Line 359: | Line 359: | ||
We could declare *while* loop which will be repeated until the condition is true: |
We could declare *while* loop which will be repeated until the condition is true: |
||
program = |
public program = |
||
[ |
[ |
||
console writeLine("Hello!"); writeLine("Guess what?"). |
console writeLine("Hello!"); writeLine("Guess what?"). |
||
Line 372: | Line 372: | ||
Alternatively *until* loop is executed until the condition is met : |
Alternatively *until* loop is executed until the condition is met : |
||
program = |
public program = |
||
[ |
[ |
||
console writeLine("Hello!"); writeLine("Guess what?"). |
console writeLine("Hello!"); writeLine("Guess what?"). |
||
Line 381: | Line 381: | ||
s := console readLine |
s := console readLine |
||
] |
] |
||
]. |
]. |
||
== Classes, Fields Methods, Constructors == |
== Classes, Fields Methods, Constructors == |