V7.8 changes affecting all or multiple products: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:


==Text/Html statement enhancements==
==Text/Html statement enhancements==
These features are added in Sirius Mods 7.8.
===Tilde directives===
as of Sirius Mods 7.8, certain Text/Html statement directives can be placed after a tilde character (~) inside curly braces ({ }) in any of the [[Targeted text statements|targeted text statements]] (which include AuditText, PrintText, TraceText, SetText, and ReturnText. For example, this statement sets <tt>%ls</tt> to the current time, embedded in hyphens.
  setText %ls = {~nocont}---{$time}---
Because the <tt>~nocont</tt> directive was specified, the terminating hyphen is not treated as a continuation character.


The '''tilde directives''' that are allowed in targeted text statements are:
<dl>
<dt>~exprE
<dd>Sets the expression end characters. This directive must be followed by a space and then the expression start characters. For example, <tt>{~expre >}</tt> sets the expression end characters to a single greater-than sign (>). ~exprE can also be written as <tt>~exprEnd</tt>. Note that the ~exprE directive must be ended by the expression end characters in effect before the ~expre directive is processed.
<dt>~exprS
<dd>Sets the expression start characters. This directive must be followed by a space and then the expression start characters. For example, <tt>{~exprs <}</tt> sets the expression start characters to a single less-than sign (<). ~exprS can also be written as  <tt>~exprStart</tt>.
<dt>~noCont
<dd>Indicates that a trailing hyphen is not treated as a continuation character. ~noCont can also be written as <tt>~noContinuations</tt>.
<dt>~noEll
<dd>Indicates that a trailing ellipsis (...) is '''not''' treated as a partial-line indicator. Because it makes no sense to end a SetText or ReturnText with an ellipsis, this is the default for those two statements. So, while allowed, a ~noEll directive is completely unnecessary for SetText and ReturnText. ~noEll can also be written as <tt>~noEllipses</tt>.
<dt>~noExpr
<dd>Indicates that no expressions are to be processed after the directive, and that everything after the ~noExpr directive is treated as literal text. No further tilde directives will be processed after a ~noExpr. ~noExpr can also be written as <tt>~noExpressions</tt>.
<dt>~raw
<dd>Acts as if ~noCont, ~noEll, and ~noExpr are specified simultaneously. Note that this is slightly different from the <tt>Raw</tt> directive on the Text/Html statement, which also implies NoDum/NoDummy. Because dummy string substitution applies to lines before they are parsed, dummy string substitution would already have happened in any single-line Text statement before the ~raw directive was processed.
</dl>




{Hierarchy footer}
{Hierarchy footer}

Revision as of 00:07, 18 December 2010

{Hierarchy header}

Text/Html statement enhancements

These features are added in Sirius Mods 7.8.

Tilde directives

as of Sirius Mods 7.8, certain Text/Html statement directives can be placed after a tilde character (~) inside curly braces ({ }) in any of the targeted text statements (which include AuditText, PrintText, TraceText, SetText, and ReturnText. For example, this statement sets %ls to the current time, embedded in hyphens.

 setText %ls = {~nocont}---{$time}---

Because the ~nocont directive was specified, the terminating hyphen is not treated as a continuation character.

The tilde directives that are allowed in targeted text statements are:

~exprE
Sets the expression end characters. This directive must be followed by a space and then the expression start characters. For example, {~expre >} sets the expression end characters to a single greater-than sign (>). ~exprE can also be written as ~exprEnd. Note that the ~exprE directive must be ended by the expression end characters in effect before the ~expre directive is processed.
~exprS
Sets the expression start characters. This directive must be followed by a space and then the expression start characters. For example, {~exprs <} sets the expression start characters to a single less-than sign (<). ~exprS can also be written as ~exprStart.
~noCont
Indicates that a trailing hyphen is not treated as a continuation character. ~noCont can also be written as ~noContinuations.
~noEll
Indicates that a trailing ellipsis (...) is not treated as a partial-line indicator. Because it makes no sense to end a SetText or ReturnText with an ellipsis, this is the default for those two statements. So, while allowed, a ~noEll directive is completely unnecessary for SetText and ReturnText. ~noEll can also be written as ~noEllipses.
~noExpr
Indicates that no expressions are to be processed after the directive, and that everything after the ~noExpr directive is treated as literal text. No further tilde directives will be processed after a ~noExpr. ~noExpr can also be written as ~noExpressions.
~raw
Acts as if ~noCont, ~noEll, and ~noExpr are specified simultaneously. Note that this is slightly different from the Raw directive on the Text/Html statement, which also implies NoDum/NoDummy. Because dummy string substitution applies to lines before they are parsed, dummy string substitution would already have happened in any single-line Text statement before the ~raw directive was processed.


{Hierarchy footer}