send Statement

Home Scripting Statements send Statement

The send statement allows you to send a message to a field from a script, with the message expressed as a textual message name. As usual, if that field has a script with the name of that message, the script gets executed.

You are not restricted to the predefined message names supported by MoStacks, like select or exitField, but you can use arbitrary names. Because of this, from the point of view of more "conventional" programming languages, by using send you do nothing else than call a subroutine or procedure.

Unfortunately, the send statement does not yet support parameters. If you have to pass any info from the calling script to the called script, do so through fields.

The syntax of the send statement:

send <string expression> to <field reference>

An example:

send "calcWarnDate" to field "Warn date"