Procedures

Procedures are similar to functions, except they do not provide a return value.

procedure fix(atom a, atom b)
atom c, d
   c = a + b
   d = a - b
   print(1,c*d)
end procedure

fix(3,4)
fix(45,13)
fix(6,143.3)

In this program, the procedure fix() does the printing for us. The procedure also does not return a value, so if we were to try and assign a value or use it somehow, such as with print(1,...), we would generate an error.

x = fix(9,3) -- THIS GENERATES AN ERROR