Important note: all examples follow aTbRef naming conventions.
NOTE: this subject is only pertinent for more expert users
Can a function code contain another complete function?
In principle, Yes, this is possible. Those with a programming background may be used to techniques like nesting one function inside another. However, there is no difference in use by doing so and it is currently not recommended. Why:
- Tinderbox may harden scoping rules in the future, which would break existing code.
- It is confusing, and likely to give a headache when trying, a month from now, to figure out what the code is doing.
Variables in the outer function are (likely) accessible to the nested function but again, this is currently not recommended.
Next: Re-using variables from other functions
See also—notes linking to here: