User Tools

Site Tools


expando_substitution

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

expando_substitution [2007/08/06 21:25] (current)
Line 1: Line 1:
 +======Expando substitutions======
 +Before a string can be used, it must be "​expanded"​ whereby the expandos (things
 +that start with $) in the string are removed and replaced with their values, ​
 +and backslashes (\\) are dequoted. ​ However, stuff inside of parenthesis ​
 +"​(...)"​ or curly braces "​{...}"​ is considered literal text and is not 
 +expanded. ​ The stuff inside parenthesis and curly braces is usually
 +expanded later by someone else.
 +
 +======Places where expandos are substituted======
 +The following strings are expanded each time they are used:
 +  - Command statements before they are executed, as in "//​echo $ooga//"​
 +  - The argument list to any function call, as in $foo(//​$ooga//​)
 +  - Any expression [[lval]]ue, as in "​@//​$ooga//​ += 3"
 +  - The contents of a [...] or "​..."​ expression operand, as in "@foo = [//​$ooga//​]"​
 +  - The default value of an arglist variable, as in "alias off (var1 default "//​$ooga//"​) ​
 +  - The width modifier in an expando (see below), as in "​$[//​$ooga//​]foo"​
 +  - The inside of the $(...) expando, as in $(//​$ooga//​)
 +  - The BX compatable form of $cparse(), as in $cparse("​one two" //buckle my $1 shoes $ooga//)
 +  - The wildcard pattern of a flexible hook, as in /on msg '//​$ooga//​ *' {...}
 +  - The word list to [[fe]] or [[fec]], as in /fe (//$ooga//) {...}
 +  - The word list to [[for|for var in]], as in /for i in (//$ooga//) {...}
 +  - The control value in [[switch]], as in /switch (//$ooga//) {...}
 +  - The matching pattern in [[switch]], as in /switch ($*) {(//​$ooga//​) {...}}
 +  - Ach, there are so many more...
 +
 +=====Modifiers applicable to any expando=====
 +
 +=====All forms=====
 +
 +=====Protection from expansion=====
 +
 +=====Expandos and expression mode=====
 +
 +=====Special expandos=====
  
expando_substitution.txt ยท Last modified: 2007/08/06 21:25 (external edit)