11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Parameter Description<br />

The replace.num option controls whether GROUPSTORE replaces all, part, or none<br />

of the substring. The following table describes these options.<br />

1-322 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

start.num Specifies the position from which to begin replacing elements of the string.<br />

start.num must be at least 1. If you specify a value of less than 1, start.num<br />

defaults to 1. If start.num is negative and replace.num is not negative,<br />

<strong>UniBasic</strong> uses the absolute value of start.num.<br />

If start.num is greater than the number of elements in the target string,<br />

<strong>UniBasic</strong> appends the substr to the end of the string with the appropriate<br />

number of delimiters in between.<br />

replace.num Specifies the number of elements in the string to replace with elements of<br />

substr.<br />

Refer to the next table for values for replace.num.<br />

,delimiter Specifies a single ASCII character to use as a delimiter. The default<br />

delimiter is @AM. If you specify more than one character for delimiter,<br />

<strong>UniBasic</strong> uses the first character.<br />

replace.nu<br />

m Value Description<br />

GROUPSTORE Parameters (continued)<br />

> 0 The first replace.num elements of the substr replaces elements of the string<br />

starting from the position specified by start.num. If the string contains fewer<br />

than replace.num elements starting from start.num, the replacement stops<br />

after the string is exhausted.<br />

0 The entire substr is inserted before the start.num position in the string.<br />

< 0 The number of elements specified in replace.num are deleted starting at<br />

start.num, and substr replaces them.<br />

If both start.num and replace.num are less than 0, replacement does not take<br />

place. Only the number of elements specified in replace.num are deleted,<br />

starting at start.num.<br />

GROUPSTORE Replace Number Values

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!