doc: lots more exiciting expressions for the sample file
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
/*
|
|
||||||
y = 1 + 2 * 3 / 4 * 5 - 6 + 7 multiplyBy:2.
|
y = 1 + 2 * 3 / 4 * 5 - 6 + 7 multiplyBy:2.
|
||||||
z = w = 2 + 3 multiplyBy:2.
|
z = w = 2 + 3 multiplyBy:2.
|
||||||
x = (((1 + 2 * 3) multiplyBy:3) add: 5) + 2.
|
x = (((1 + 2 * 3) multiplyBy:3) add: 5) + 2.
|
||||||
@@ -6,8 +5,6 @@ x = ((1 + 2 * 3) multiplyBy:3).
|
|||||||
p = 5 multiply(by:3 add:(2 + 1)).
|
p = 5 multiply(by:3 add:(2 + 1)).
|
||||||
q = 10 squared squared.
|
q = 10 squared squared.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
p1
|
p1
|
||||||
setAge:2 squared squared + 4 squared multiply(by:2 add:4 + 1 * 3)
|
setAge:2 squared squared + 4 squared multiply(by:2 add:4 + 1 * 3)
|
||||||
in:"mon" + "ths".
|
in:"mon" + "ths".
|
||||||
@@ -22,13 +19,10 @@ x = OrderedCollection new
|
|||||||
add: 6;
|
add: 6;
|
||||||
yourself.
|
yourself.
|
||||||
|
|
||||||
|
|
||||||
age = Person new(name:"John Doe" age:34)
|
age = Person new(name:"John Doe" age:34)
|
||||||
setAge:144 inUnit:"months";
|
setAge:144 inUnit:"months";
|
||||||
ageInMonths.
|
ageInMonths.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
x = 5.
|
x = 5.
|
||||||
q = 10 if x > 2.
|
q = 10 if x > 2.
|
||||||
q = if x > 2 then 10 else 20 end.
|
q = if x > 2 then 10 else 20 end.
|
||||||
@@ -40,7 +34,6 @@ if x > 2 then
|
|||||||
else
|
else
|
||||||
cout put:"Less"
|
cout put:"Less"
|
||||||
end
|
end
|
||||||
*/
|
|
||||||
|
|
||||||
Q = match yz in
|
Q = match yz in
|
||||||
1 => age = age,
|
1 => age = age,
|
||||||
@@ -53,4 +46,15 @@ while x > 2 do
|
|||||||
cout put:"message"
|
cout put:"message"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for i in 0 to:100 step:2 do
|
||||||
|
cout put:"Count is {i}"
|
||||||
|
end
|
||||||
|
|
||||||
cout put:"message" while x > 2.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user