Hello everyone
This all started with the impossibility to use macros inside macros. I’ve been looking at functions as a possible solution for what I want to do, which is:
Create a set of global functions that can fall each other.
The idea is for example to have a global function .round(decimals)
, and another function .yardstometers(yards)
, and being able to chain [.yardstometers(value)].round[2]
, so that I can keep the fields I have in tiddlers are expressed in yards (the source unit), and simply use something like [.yardstometers({!!yards-field}].round[2]] in my tiddlers manipulating those distances in yards.
Unfortunately, I’m way over my head and can’t seem to manage making it work (I’m probably still very fuzzy on the syntax and the fit of my use case to functions).
Can anybody show me an example of what I’m trying to do with the yards to meters and rounding to 2 decimals?