56 lines
880 B
Plaintext
56 lines
880 B
Plaintext
/*
|
|
y = 1 + 2 * 3 / 4 * 5 - 6 + 7 multiplyBy:2.
|
|
z = w = 2 + 3 multiplyBy:2.
|
|
x = (((1 + 2 * 3) multiplyBy:3) add: 5) + 2.
|
|
x = ((1 + 2 * 3) multiplyBy:3).
|
|
p = 5 multiply(by:3 add:(2 + 1)).
|
|
q = 10 squared squared.
|
|
|
|
|
|
|
|
p1
|
|
setAge:2 squared squared + 4 squared multiply(by:2 add:4 + 1 * 3)
|
|
in:"mon" + "ths".
|
|
|
|
M = xz multiply(by:3 add:2) squared.
|
|
|
|
M = xz multiply(by:3 add:2); squared.
|
|
|
|
x = OrderedCollection new
|
|
add: 2;
|
|
add: 4;
|
|
add: 6;
|
|
yourself.
|
|
|
|
|
|
age = Person new(name:"John Doe" age:34)
|
|
setAge:144 inUnit:"months";
|
|
ageInMonths.
|
|
|
|
|
|
|
|
x = 5.
|
|
q = 10 if x > 2.
|
|
q = if x > 2 then 10 else 20 end.
|
|
|
|
cout put:5 multiply(by:5 add:2) if x > 2.
|
|
|
|
if x > 2 then
|
|
cout put:"Greater"
|
|
else
|
|
cout put:"Less"
|
|
end
|
|
*/
|
|
|
|
Q = match yz in
|
|
1 => age = age,
|
|
2 => age = age / 12,
|
|
3 => age = age / 365,
|
|
_ => age = 0
|
|
end.
|
|
|
|
while x > 2 do
|
|
cout put:"message"
|
|
end
|
|
|
|
cout put:"message" while x > 2. |