UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

Parameter Description Examples In the following example, A is a dimensioned array with five elements: 1-440 UniBasic Commands Reference ,start.num Specifies the starting position in the dimensioned array. If start.num is less than or equal to 0, UniData defaults to 1. The dynamic array is not generated if start.num is greater than end.num. ,end.num Specifies the ending position in the dimensioned array. If end.num is less than or equal to 0, or if it is beyond the end of the dimensioned array, UniData retrieves data to the end of the dimensioned array. USING delim The USING clause specifies the delimiter delim in the dyn.array generation. If you do not specify delim, or if you specify an empty string, delim defaults to @AM (attribute mark). If you specify more than one character, only the first character is used. UniData inserts delim between the elements if dyn.array. A(1)=11, A(2)=22, A(3)=33, A(4)=44, and A(5)=55 The following program statement: MATBUILD NEW.ARRAY FROM A ,2,4 generates the following dynamic array: NEW.ARRAY = "22":@AM:"33":@AM:"44" The next program statement: MATBUILD ARRAY FROM A ,1 USING ',' generates the following dynamic array: ARRAY = "11,22,33,44,55" MATBUILD Parameters (continued)

Related Commands UniBasic DIM, INMAT, MAT, MATPARSE, MATREAD, MATREADL, MATREADU, MATWRITE, MATWRITEU MATBUILD 1-441

Parameter Description<br />

Examples<br />

In the following example, A is a dimensioned array with five elements:<br />

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

,start.num Specifies the starting position in the dimensioned array. If start.num<br />

is less than or equal to 0, UniData defaults to 1. The dynamic array<br />

is not generated if start.num is greater than end.num.<br />

,end.num Specifies the ending position in the dimensioned array.<br />

If end.num is less than or equal to 0, or if it is beyond the end of the<br />

dimensioned array, UniData retrieves data to the end of the<br />

dimensioned array.<br />

USING delim The USING clause specifies the delimiter delim in the dyn.array<br />

generation. If you do not specify delim, or if you specify an empty<br />

string, delim defaults to @AM (attribute mark). If you specify more<br />

than one character, only the first character is used. UniData inserts<br />

delim between the elements if dyn.array.<br />

A(1)=11, A(2)=22, A(3)=33, A(4)=44, and A(5)=55<br />

The following program statement:<br />

MATBUILD NEW.ARRAY FROM A ,2,4<br />

generates the following dynamic array:<br />

NEW.ARRAY = "22":@AM:"33":@AM:"44"<br />

The next program statement:<br />

MATBUILD ARRAY FROM A ,1 USING ','<br />

generates the following dynamic array:<br />

ARRAY = "11,22,33,44,55"<br />

MATBUILD Parameters (continued)

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

Saved successfully!

Ooh no, something went wrong!