
73
Class Reference
Format:
result = storage.erase(name);
Where:
name
– string; the name of the object to erase.
result
– Boolean;
true
if the file existed (the object is deleted);
false
if the file did not
exist.
Example:
storage.erase("TimeCard” + employeeNumber);
Erases the time card record for the employee specified by
employeeNumber
.
4.4.1.3
findFirst
The
storage.findFirst
method locates the first file where the name matches a regular
expression specified in the call parameter.
Format:
name = storage.findFirst(expression);
Where:
expression
– regular expression (not a string); a regular expression used by the
handheld to match against names of stored objects.
name
– string; the name of the first matching file;
name
is
null
if no file matches the
expression
.
Example:
name = storage.findFirst(/^TimeCard.*/);
Sets
name
to the name of the first time card record file.
4.4.1.4
findNext
The
storage.findNext
method locates the next file where the name matches the
regular expression specified in the
expression
parameter of a previous
storage.findFirst
call. The matching names are not ordered, but they will not be
repeated; a
findFirst - findNext
sequence will return all matching files, provided
that there are no other intervening storage method calls. (You can put the files into an array
and use JavaScript’s sort method when you need them ordered.)
Format:
name = storage.findNext();
Where:
name
– string; the name of a file;
name
is
null
if no remaining file matches the previous
regular expression.
Содержание OHV300
Страница 1: ...FACTORY AUTOMATION MANUAL JAVASCRIPT PROGRAMMING GUIDE...
Страница 88: ...88 Supported JavaScript Core delete function in instanceof new this typeof void...
Страница 93: ...93 Symbology ID Modifier Information...
Страница 94: ...TDOCT 4981_ENG 11 2015...