1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-07 20:44:23 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/features/VariableFormat.tid
2024-05-01 13:02:27 +02:00

23 lines
1.4 KiB
Plaintext

created: 20240219185725834
modified: 20240501103053921
tags: Features
title: VariableFormat
type: text/vnd.tiddlywiki
<<.from-version "5.3.4">>
Finding "self explaining" variable names for functions, procedures, widgets and macros is difficult. So if variables are listed with <<.mlink dumpvariables>>, <<.mlink search-variables>> or from the "Variables" tab in the $:/AdvancedSearch, it's not obvious ''how'' they work and how they are defined.
The <<.olink variables>> operator returns all "visible" variables from the current context, depending on where the filter run is executed. The getvariable-operator allows us to return the "text" or the "value" of variables. But this information is not enough to get a good understanding of existing variables.
So using getvariable-operator in combination with the <<.olink format>> operator we are able to improve information in variable listings.
|Token |Substituted Value |h
|`$type$` |variabe type eg: `\function`, `\procedure` and so on |
|`$name$` |returns the name of the variable |
|`$params$` |returns a list of parameters, which are defined with functions, procedures ... |
|`$firstLine$` |returns the first line of the variable content-type as used by <<.olink getvariable>> |
|`$varType$` |returns `var`, `fn`, ` proc`, ` macro` or ` widget` which can be used with the <<.olink variables>> operator |
See: <<.mlink dumpvariables>>, <<.mlink search-variables>> or $:/AdvancedSearch