2024-12-02 10:48:32 +00:00
|
|
|
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).
|
2024-12-02 11:00:00 +00:00
|
|
|
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".
|
2024-12-03 21:58:02 +00:00
|
|
|
|
|
|
|
|
M = xz multiply(by:3 add:2) squared.
|
|
|
|
|
|
2024-12-04 22:23:33 +00:00
|
|
|
M = xz multiply(by:3 add:2); squared.
|
2024-12-03 21:58:02 +00:00
|
|
|
|
|
|
|
|
x = OrderedCollection new
|
|
|
|
|
add: 2;
|
|
|
|
|
add: 4;
|
|
|
|
|
add: 6;
|
|
|
|
|
yourself.
|
|
|
|
|
|
|
|
|
|
age = Person new(name:"John Doe" age:34)
|
|
|
|
|
setAge:144 inUnit:"months";
|
2024-12-04 16:35:54 +00:00
|
|
|
ageInMonths.
|
|
|
|
|
|
2024-12-04 22:23:33 +00:00
|
|
|
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
|
2024-12-05 19:29:36 +00:00
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
while x > 2 do
|
|
|
|
|
cout put:"message"
|
|
|
|
|
end
|
|
|
|
|
|
2024-12-06 10:02:51 +00:00
|
|
|
for i in 0 to:100 step:2 do
|
|
|
|
|
cout put:"Count is {i}"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
cout put:"message" while x > 2.
|
|
|
|
|
cout put:"Count is {i}" for i in 0 to:100 step:2.
|
|
|
|
|
|
|
|
|
|
z = do
|
|
|
|
|
x = 1.
|
|
|
|
|
y = 2.
|
|
|
|
|
^x + y
|
|
|
|
|
end.
|