created: 20221007124007426 modified: 20221007144806995 tags: Concepts Reference title: Procedures type: text/vnd.tiddlywiki !! Introduction A <<.def procedure>> is a named snippet of text. They are typically defined with the [[Pragma: \procedure]]: ``` \procedure my-procedure(parameter:"Default value") This is the procedure, and the parameter is <>. \end ``` The name wrapped in double angled [[brackets|Brackets]] is used a shorthand way of [[transcluding|Transclusion]] the snippet. Each of these <<.def "procedure calls">> can supply a different set of parameters: ``` <> <> ``` The parameters that are specified in the procedure call are made available as variables. !! How Procedures Work Procedures are implemented as a special kind of [[variable|Variables]]. The only thing that distinguishes them from ordinary variables is the way that the parameters are handled. !! Using Procedures * [[Procedure Definitions]] describes how to create procedures * [[Procedure Calls]] describes how to use procedures * [[Procedure Parameter Handling]] describes how procedure parameters work