aTbRef: 'library' designator page refresh

The article on the ‘library’ designator has been re-written/refreshed. It was noticed in yesterday’s meet-up that it didn’t quite make sense. Now rectified.

I’ve also updated the search page index to reflect the revised content and also the ZIP of the TBX for those working from source.

1 Like

I’ve updated this a bit more (tip 'o the hat to @entropydave for reporting a (new) typo). Fixing that also gave me an idea for a clearer re-statement.

I’ve tried to cover an issue discussed at last weekend’s meet-up, that of library values vs global variables and the scope of use. The library designator turns nothing if used anywhere outside the code of a user function. As such it cannot be used in the method @echuck showed of using Library notes with bare action code as opposed to functions. There is no error in the latter, or a better/worse use.

The important nuance is from where library is called. Whilst most Library notes† are used to contain user functions, they can also be used for ‘bare’ action code by calling their $Text in an action(). But library only works in the first of those two contexts.

†. i.e. in /Hints/Library.