A procedure is a function that may have side effects, that is, it may change the value of state variables. Unlike a function, a procedure may only be used in other procedures, or by events. Its syntax is the same, except if its return type is void, it can be omitted.


variable int score;

procedure void increaseScore(int x) {
    score += x;