doc: add more complex expressions to sample file

This commit is contained in:
2024-12-04 16:35:54 +00:00
parent 5af47ce443
commit 04ee7d77c0

View File

@@ -1,4 +1,4 @@
/*
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.
@@ -23,4 +23,11 @@ x = OrderedCollection new
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.
--q = 10 if x > 2.
--q = if x > 2 then 10 else 20 end.
cout put:5 multiply(by:5 add:2).