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.

LOCATE in BASICTYPEs U, P, and M<br />

The following table compares the searches performed in BASICTYPEs U, P, and M.<br />

Examples<br />

The following program segment is taken from the sample program in Appendix A,<br />

“Sample Program,” in Developing <strong>UniBasic</strong> Applications. LOCATE returns the<br />

position of the order number to be deleted.<br />

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

LOCATE Parameter in BASICTYPE U in BASICTYPEs P and M<br />

no expr Performs no search; invalid<br />

syntax.<br />

attrib.expr Searches the attribute<br />

specified; match must<br />

include associated values<br />

and subvalues.<br />

val.expr Searches the value specified;<br />

match must include<br />

associated subvalues.<br />

subval.expr Searches subvalues<br />

associated with the specified<br />

value; begins with the<br />

specified subvalue.<br />

Comparison of BASICTYPEs U, P, and M<br />

Searches all attributes; match<br />

must include associated values<br />

and subvalues.<br />

Searches values associated with<br />

the specified attribute; match<br />

must include associated<br />

subvalues.<br />

Searches subvalues associated<br />

with the specified value.<br />

Performs no search; invalid<br />

syntax.<br />

DELETE_RECORD:<br />

* (Assuming the order #'s are on line 12)<br />

READVU ORDER_LINE FROM CLIENT_FILE,CLIENT_NUMBER,12 THEN<br />

LOCATE ORDER_NUMBER IN ORDER_LINE SETTING POSITION THEN<br />

DEL ORDER_LINE<br />

END<br />

WRITEV ORDER_LINE ON CLIENT_FILE, CLIENT_NUMBER, 12<br />

END

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

Saved successfully!

Ooh no, something went wrong!