Difference between revisions of "Programmer Guide/Command Reference/QUOTE"

From STX Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
  <var>#a</var> := QUOTE /- <var>arg<sub>1</sub></var> &hellip; <var>arg<sub>n</sub></var>
+
  <var>#a</var> := QUOTE [[/-]] <var>arg<sub>1</sub></var> &hellip; <var>arg<sub>n</sub></var>
  
 
Will set <var>#a</var> to <code>[[#SOH|&lt;SOH&gt;]]arg<sub>1</sub> &hellip; arg<sub>n</sub>[[#SOH|&lt;SOH&gt;]]</code>.
 
Will set <var>#a</var> to <code>[[#SOH|&lt;SOH&gt;]]arg<sub>1</sub> &hellip; arg<sub>n</sub>[[#SOH|&lt;SOH&gt;]]</code>.
  
  <var>#a</var> := QUOTE /E /- <var>arg<sub>1</sub></var> &hellip; <var>argn</var>
+
  <var>#a</var> := QUOTE /E [[/-]] <var>arg<sub>1</sub></var> &hellip; <var>argn</var>
  
 
Quote elementwise: this will set <var>#a</var> to <code>[[#SOH|&lt;SOH&gt;]]<var>arg1</var>[[#SOH|&lt;SOH&gt;]] &hellip; [[#SOH|&lt;SOH&gt;]]<var>arg<sub>n</sub></var>[[#SOH|&lt;SOH&gt;]]</code>.
 
Quote elementwise: this will set <var>#a</var> to <code>[[#SOH|&lt;SOH&gt;]]<var>arg1</var>[[#SOH|&lt;SOH&gt;]] &hellip; [[#SOH|&lt;SOH&gt;]]<var>arg<sub>n</sub></var>[[#SOH|&lt;SOH&gt;]]</code>.
  
  <var>#a</var> := QUOTE</code> /R /- <var>arg<sub>1</sub></var> &hellip; <var>arg<sub>n</sub></var>
+
  <var>#a</var> := QUOTE</code> /R [[/-]] <var>arg<sub>1</sub></var> &hellip; <var>arg<sub>n</sub></var>
  
 
Will set <var>#a</var> to <code><var>arg<sub>1</sub></var>* &hellip; <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|&lt;SOH&gt;]]</code>.
 
Will set <var>#a</var> to <code><var>arg<sub>1</sub></var>* &hellip; <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|&lt;SOH&gt;]]</code>.

Revision as of 18:49, 29 April 2014

#a := QUOTE /- arg1argn

Will set #a to <SOH>arg1 … argn<SOH>.

#a := QUOTE /E /- arg1argn

Quote elementwise: this will set #a to <SOH>arg1<SOH><SOH>argn<SOH>.

#a := QUOTE /R /- arg1argn

Will set #a to arg1* … argn*, where argn* is argn after replacing every occurrence of the quote character, "'", by <SOH>.

See the script quote_examples.sts for more details.

The option /R takes a lot of precedence over /E.

The SOH character

The string "<SOH>" indicates the ECMA/ASCII start of heading character with the binary value 00000001.