User Guide
274 Chapter 12: Methods
cos()
Usage
(angle).cos
cos (angle)
Description
Function (Lingo only); calculates the cosine of the specified angle, which must be expressed
in radians.
In JavaScript syntax, use the Math object’s
cos() function.
Parameters
angle
Required. An integer that specifies the angle to test.
Example
The following statement calculates the cosine of PI divided by 2 and displays it in the
Message window:
put (PI/2).cos
See also
atan(), PI, sin()
count()
Usage
-- Lingo syntax
list.count
object.count
// JavaScript syntax
list.count;
object.count;
Description
Function; returns the number of entries in a linear or property list, the number of properties in a
parent script without counting the properties in an ancestor script, or the chunks of a text
expression such as characters, lines, or words.
The
count command works with linear and property lists, objects created with parent scripts, and
the globals property.
To see an example of
count() used in a completed movie, see the Text movie in the Learning/
Lingo folder inside the Director application folder.
Parameters
None.