getOne()
Usage
list.getOne(value)
getOne(list, value)
Description
List function; identifies the position (linear list) or property (property list) associated with a value
in a list.
For values contained in the list more than once, only the first occurrence is displayed. The
command returns the result 0 when the specified value is not in the list.
getOne
When used with linear lists, the
command.
getPos
Parameters
Required. Specifies the value associated with the position or property.
value
Example
This statement identifies the position of the value 12 in the linear list Answers, which consists of
[10, 12, 15, 22]:
put Answers.getOne(12)
The result is 2, because 12 is the second value in the list.
This statement identifies the property associated with the value 12 in the property list Answers,
which consists of [#a:10, #b:12, #c:15, #d:22]:
put Answers.getOne(12)
The result is #b, which is the property associated with the value 12.
See also
getPos()
getOSDirectory()
Usage
-- Lingo syntax
getOSDirectory()
// JavaScript syntax
getOSDirectory();
Description
Function; Returns the full path to the System folder (Macintosh) or Windows directory
(Windows).
Parameters
None.
See also
Fileio
338
Chapter 12: Methods
command performs the same functions as the
getOne
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers