Programming Puzzles are used in [link{block/programmer}]programmers [link{}].

[prefix{l}]The Coordinate Operation piece [prefix{}]
The Coordinate Operation comes into play when dealing with [link{pneumaticcraft:progwidget/coordinate}]Coordinates [link{}] as variables.

You can [link{www.youtube.com/watch?v=FIjEdD_Yj9Y}]click here[link{}] to see a video where these variables are explained graphically.

The Coordinate Operation piece takes all connected Coordinate pieces to the right of the piece, and adds/multiplies them together. Whether it's adding or multiplying is dependent on the mode the piece is set to. Coordinates on the left side will be subtracted from the total when in add/subtract mode, or the total will be divided by the pieces on the left side when in multiply/subtract mode.

The end result is stored in a variable, defined by the name put in the Coordinate Operation when you right click it. Using this name, you can get this coordinate back later. In the [link{pneumaticcraft:progwidget/area}] Area[link{}] piece you can instead of putting in a GPS coordinate, put in a variable name of a coordinate. These variables are kept saved, even if the world reloads. These variables could be used to create an endless mining program for example.

Variables only allow you to store coordinates. However, if you think about it more carefully, you will notice it allows you to work with integers (whole number variables) and booleans (true and false) as well. You just need to use only one axis, and in case of booleans, define something like '0' means false, and everything else means true. Have fun!

[prefix{l}]Special Variables ($)[prefix{}]
Apart from assigning variables yourself, there are a few special variables, which are set externally. They all are prefixed with '$':

$owner = Gets the coordinate of the player who owns the Drone. This will be 0,0,0 if the owner is not online.
$drone = Gets the coordinate of the drone itself.
$player=<playername> = Gets the coordinate of the player inserted for '<playername>' (case insensitive). For example, '$player=MineMaarten' will get the coordinate of MineMaarten. This will be 0,0,0 if the player does not exist or is not online.

[prefix{l}]Global Variables (#)[prefix{}]
Another special kind of variable is the global variable. They are prefixed with '#'. Normal variables are unique per Drone. They can't be shared. Global variables are variables that ARE shared. This allows Drones to communicate with each other. Additionally, the [link{block/universalSensor}]Universal Sensor[link{}] can look for global variables, and emit a redstone signal based on them.