doc: add more complex expressions to sample file
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
|
||||
/*
|
||||
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.
|
||||
@@ -23,4 +23,11 @@ x = OrderedCollection new
|
||||
|
||||
age = Person new(name:"John Doe" age:34)
|
||||
setAge:144 inUnit:"months";
|
||||
ageInMonths.
|
||||
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).
|
||||
Reference in New Issue
Block a user