For those wanting to make the most of notes calculations, I have figured out a few things that don't seem to be mentioned anywhere else.
1. Variables that use other variables don't refresh by default
for example:
test3 = test1 + test2
However you can add = at the end to force recalculation if test1 or test2 change
test3 = test1 + test2 = (result)
2. Displaying a variable created from other variables doesn't refresh when the value changes
for example the following will only be calculated the first time, not when test3 changes;
test3 = (result)
There are a few ways to force an update, you can do
0 + test3 = (result)
this forces recalculation as it thinks it needs to recalculate the 0+ part
or a nicer way would be:
-- test3 = (result)
this is just making a double negative resulting in the original value, but recalculates on test3 change
3. The apple website shows examples of converting to other currencies by doing:
test3 to gbp = (result)
test3 to eur = (result)
but you can also convert to other types by using characters such as:
d: days
h: hours
c: celsius
for example:
test3 d = (result)
test3 h = (result)
there are more so have a play around to find them
4. You can use mathematical functions
for example:
test3 = round (test1) + floor (test2) = (result)
5. You can make your notes much more tidy by using subheadings
create a heading or subheading (I call mine calculations)
Then format the line to Monostyled
put all of your calculations and variables in there
close the heading and use the calculated variables outside that hidden section
This will give you a nice tidy note where you can list your results
Just remember to use the tips 1 and 2 to ensure things are all updated correctly when changing a value
6. Variables don't support special characters so use camelCase to give them good names
7. An example if a working updating bills list:
The following example should also have everything update when changing a value.
Changing salary for example should update all values down to the totals using the tricks above
** INCOME **
Salary = £3000
** OUTGOINGS **
CarFinance = £300
Mortgage = £800
Food = £200
** CALCULATIONS ** (we can collapse this subheading to hide the calculations)
Expenses = CarFinance + Mortgage + Food = (result)
Disposable = Salary - Expenses = (result)
OugoingPercentage = round(Expenses/(salary/100)) = (result)
** TOTALS **
Expenses = (result)
Disposable = (result)
OugoingPercentage = (result)%
8. That's it, would be nice if Apple could
- release better documentation on the features and how they work
- fix the bug of child variables not being updated without the = or -- tricks
- integrate lists or tables to be arrays of variables so instead of:
a=1
b=2
c=3
total = a + b + c .etc
we could do:
exampleValues = 1, 2, 3
total = sum(exampleValues )
or even:
exampleValues :
a = 1
b = 2
c = 4
total = sum(exampleValues )
this would enable things to be much neater and make the features here feel less half-baked