Programmer Guide/Command Reference/QUOTE: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
#a := QUOTE /- <var>arg<sub>1</sub></var> … <var>arg<sub>n</sub></var> | <var>#a</var> := QUOTE /- <var>arg<sub>1</sub></var> … <var>arg<sub>n</sub></var> | ||
Will set <var>#a</var> to <code><SOH>arg<sub>1</sub> … arg<sub>n</sub><SOH></code>. | Will set <var>#a</var> to <code>[[#SOH|<SOH>]]arg<sub>1</sub> … arg<sub>n</sub>[[#SOH|<SOH>]]</code>. | ||
#a := QUOTE /E /- <var>arg<sub>1</sub></var> … <var>argn</var> | <var>#a</var> := QUOTE /E /- <var>arg<sub>1</sub></var> … <var>argn</var> | ||
Quote elementwise: this will set <var>#a</var> to <code><SOH><var>arg1</var><SOH> … <SOH><var>arg<sub>n</sub></var><SOH></code>. | Quote elementwise: this will set <var>#a</var> to <code>[[#SOH|<SOH>]]<var>arg1</var>[[#SOH|<SOH>]] … [[#SOH|<SOH>]]<var>arg<sub>n</sub></var>[[#SOH|<SOH>]]</code>. | ||
#a := QUOTE</code> /R /- <var>arg<sub>1</sub></var> … <var>arg<sub>n</sub></var> | <var>#a</var> := QUOTE</code> /R /- <var>arg<sub>1</sub></var> … <var>arg<sub>n</sub></var> | ||
Will set <var>#a</var> to <code><var>arg<sub>1</sub></var>* … <var>arg<sub>n</sub></var>*</code>, where <var>arg<sub>n</sub></var><code>*</code> is <var>arg<sub>n</sub></var> after replacing every occurrence of the quote character, "<code>'</code>", by <code><SOH></code>. | Will set <var>#a</var> to <code><var>arg<sub>1</sub></var>* … <var>arg<sub>n</sub></var>*</code>, where <var>arg<sub>n</sub></var><code>*</code> is <var>arg<sub>n</sub></var> after replacing every occurrence of the quote character, "<code>'</code>", by <code>[[#SOH|<SOH>]]</code>. | ||
Note that <code><SOH></code> indicates the ECMA/ASCII SOH character ("start of heading") with the binary value <code>00000001</code>. | {{anchor|SOH|Note that <code><SOH></code> indicates the ECMA/ASCII SOH character ("start of heading") with the binary value <code>00000001</code>.}} | ||
See the script <code>quote_examples.sts</code> for more details. | See the script <code>quote_examples.sts</code> for more details. | ||
The option <code>/R</code> takes a lot of precedence over <code>/E</code>. | The option <code>/R</code> takes a lot of precedence over <code>/E</code>. | ||
Revision as of 15:08, 28 April 2014
#a := QUOTE /- arg1 … argn
Will set #a to <SOH>arg1 … argn<SOH>.
#a := QUOTE /E /- arg1 … argn
Quote elementwise: this will set #a to <SOH>arg1<SOH> … <SOH>argn<SOH>.
#a := QUOTE /R /- arg1 … argn
Will set #a to arg1* … argn*, where argn* is argn after replacing every occurrence of the quote character, "'", by <SOH>.
Note that <SOH> indicates the ECMA/ASCII SOH character ("start of heading") with the binary value 00000001.
See the script quote_examples.sts for more details.
The option /R takes a lot of precedence over /E.