1. A complete set of instructions written in a particular programming language that after translation by a compiler into executable form causes a computer to perform a set of defined operations. A given program includes all the necessary instructions that cause the computer to input or output data or results, to perform mathematical operations, to store data in designated locations, to transfer data or instructions from one part of the system to another, and to perform any necessary operations required for the successful completion of the program.
A procedure (or subroutine) is a section of a program to which control may be transferred from a number of points throughout the program. When the instructions in the subroutine have been obeyed, control is returned to the point from which the transfer was made. This saves the repetition of identical sections of code in different places in the program. A diagnostic routine is used to check automatically the operation of a program or part of a program and to detect errors (see bug).
2. To cause a logic circuit, logic device, etc., to realize a particular function.