Do

From Director Online Wiki
Jump to: navigation, search

Syntax

from 8.5 Documentation

 do stringExpression 

Description

from 8.5 Documentation

 Command; evaluates stringExpression and executes the result as a Lingo statement. This command is useful for evaluating expressions that the user has typed and for executing commands stored in string variables, fields, arrays, and files.

Using uninitialized local variables within a do command creates a compile error. Initialize any local variables in advance.

Note: This command does not allow global variables to be declared; these variables must be declared in advance.

The do command works with multiple-line strings as well as single lines.

Notes

The statement about globals not being able to be declared seems false. In 8.5.1, I've tried to declare every possible global on top of the script, but setting their values using do didn't change their value. The only workaround was to declare them using 'do' as well, completely contrary to documentation.