11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In the next example, the program segment reads the record with ID NAMES and<br />

assigns the data from the record to the dimensioned array TEST:<br />

OPEN "CUSTFILE" TO CF ELSE STOP "NO CUSTFILE"<br />

MATREAD TEST FROM CF,"NAMES" ELSE FOUND = 0<br />

In the next example, the MATREAD statement includes multiline THEN and ELSE<br />

clauses:<br />

FILE.ERR = 0<br />

DIM CUST.ITEM(22)<br />

MATREAD CUST.ITEM FROM CUST.FILE,CUST.ID THEN<br />

GOSUB PROCESS.CUSTOMER:<br />

END ELSE<br />

MAT CUST.ITEM = "<br />

FILE.ERR = 1<br />

END<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

DIM, INMAT, MAT, MATBUILD, MATPARSE, MATREADL, MATREADU,<br />

MATWRITE, MATWRITEU<br />

MATREAD 1-451

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

Saved successfully!

Ooh no, something went wrong!