Global Variables

There are some variables defined in `core.q' (the standard library) which you may access. Unlike global properties, these are true variables which can be assigned to. You can even re-bind them, that is, define a local variable which "shadows" the global one, and PCC will then use the local one. In contrast, if you define a local variable named the same as a property, this will only affect your subroutines, not PCC.

Build.Remainder

When a build command is used with the "n" option, this variable will be set to the number of items that could NOT be built or destroyed.

  • zero: build order was fulfilled;
  • positive: that many items could not be built;
  • negative: that many items could not be destroyed/sold.

This variable is also used for `SellSupplies' where it specifies the number of supplies not sold.

Cargo.Remainder

When a cargo transfer command is used with the "n" option, this variable will receive the amount of cargo which was NOT beamed (either because the giving object didn't have as much, or because the receiving object was full). When such a cargo transfer was successful, this will be an empty string.

UI.Directory

This variable is used by the File Dialog to store the last browsed directory. You can change that directory by assigning to this variable.

UI.Prefix

When running a command from a key binding (see the `Bind' command), this variable contains the prefix argument, or EMPTY if none was specified.

UI.Result

The `UI.xxx' commands return their results in this variable.

In addition to these variables, there are the 25 variables `A' to `Y' which are defined by PCC. Of these, `S' is used for printing.


[ << Previous | Up | Next >> ]

Stefan Reuther <Streu@gmx.de>