There are two styles of supplying parameters to a tag: named and positional.
In the named style you supply a parameter name=value pair just as most HTML tags use:
The positional-style tag that accomplishes the same thing looks like this:
The parameter name is the first positional parameter for the [value] tag. Some people find positional usage simpler for common tags, and Interchange interprets them somewhat faster. If you wish to avoid ambiguity you can always use named calling.
In most cases, tag parameters specified in the positional fashion work the same as named parameters. However, there are a few situations where you need to use named parameters:
- If you want to specify a parameter that comes positionally after a parameter that you want to omit, e.g. omit the first parameter but specify the second. The parser would have no way of knowing which is which, so you just specify the second by name. This is rare, though, because the first positional parameters are usually required for a given tag anyway.
- When there is some ambiguity as to which parameter is which, usually due to whitespace.
- When you need to use the output of a tag as the parameter or attribute for another tag.
If you wish to use the value of a tag within a parameter of another tag, you cannot use a positional call. You must also double-quote the argument containing the tag you wish to have expanded. For example, this will not work:
To get the output of the [scratch somevar] interpreted, you must place it within a named and quoted attribute:
Note that the argument to href ('scan') did not need to be quoted; only the argument to arg, which contained a tag, needed the quotes.