Programmer Guide/Command Reference/WORD: 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}}}}
  var := WORD <var>i</var> <var>wordList</var>
  var := WORD <var>index</var> <var>word<sub>0</sub></var> [ &hellip; <var>word<sub>n</sub></var> ]


&rarr; var = 'word<sub>i</sub>' or empty if <var>i</var> is not a number or outside the range 0...nWords-1
Calling the {{Stx}} command <code>WORD</code> with the integer argument <var>index</var> will return its argument <var>word<sub>index</sub></var>, provided <var>index</var> is in the range of 0&hellip;<var>n</var>. If it is not, the {{STX}} command will return the empty string.


;<var>i</var>
;<var>i</var>
:The zero-based index of the word to return (0 &le; <var>i</var> &le; nWords-1).
:The zero-based index of the argument ("word") to return (0 &le; <var>i</var> &le; <var>n</var>).
;<var>wordList</var>
;<var>word<sub>0</sub></var> [ &hellip; <var>word<sub>n</sub></var> ]
:A blank separated list of words.
:a list of string arguments, separated by blanks


Select a word by index from a list of words. See also <code>[[Programmer Guide/Command Reference/KEYWORD|KEYWORD]]</code>.
See also the {{STx}} command <code>[[Programmer Guide/Command Reference/KEYWORD|KEYWORD]]</code>.

Revision as of 17:18, 7 May 2014

var := WORD index word0 [ … wordn ]

Calling the STx command WORD with the integer argument index will return its argument wordindex, provided index is in the range of 0…n. If it is not, the STx command will return the empty string.

i
The zero-based index of the argument ("word") to return (0 ≤ in).
word0 [ … wordn ]
a list of string arguments, separated by blanks

See also the STx command KEYWORD.

Navigation menu

Personal tools