Call command args, ...

Invoke a command.

Normally, commands are invoked by listing their name and arguments, as in

  SetWaypoint 1000, 1020

However, this only works if the command is a single word. Invoking a command on another object requires With.

Using Call, you can invoke commands using an expression. This allows commands that are hard to express using With, for example

  % set towee's fcode to the same as ours
  Call Ship(Mission.Tow).SetFCode FCode

In addition, it can be a tiny bit more efficient in some cases.

Caveat Emptor: when interpreting the "command" expression, Call will consume the longest possible expression (greedy parsing). This means, Call Foo -1 will be interpreted as the call of a subtraction expression, which is meaningless, instead of as a call of Foo with parameter -1. In this case, add an additional comma to indicate where the "command" expression ends:

  Call Foo, -1

Since: PCC2 2.0.2

See also: Elementary Commands

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.