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.

LOCATE<br />

Syntax<br />

LOCATE element IN dyn.array[,var]<br />

[BY search.type] SETTING location [THEN statements END]<br />

ELSE statements END<br />

For backward compatibility, UniData supports the following alternate syntax:<br />

LOCATE(element,dyn.array [,attrib.expr[,val.expr[,subval.expr]]];location<br />

[;search.type]) [THEN statements] [END] ELSE statements<br />

Description<br />

The <strong>UniBasic</strong> LOCATE command locates an element within a dynamic array. For<br />

LOCATE to be successful, the search string, element, must match the entire array<br />

element (including any associated lower-level elements). LOCATE does not modify<br />

the data in the array.<br />

Note: UDT.OPTIONS 85 changes the sort order for an array of mixed negative and<br />

positive numbers. With UDT.OPTIONS 85 on, negative and positive numbers are<br />

sorted in numeric order regardless of sign. This is effective for the first form of the<br />

syntax only.<br />

LOCATE 1-419

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

Saved successfully!

Ooh no, something went wrong!