program logic
program logic
[′prō·grəm ‚läj·ik]program logic
The instructions in a program arranged in a prescribed order to solve a problem. Give a set of requirements to 10 programmers, and each may create different program logic. All versions may work equally well, or there may be differences. The best program runs the fastest and is written so that it can be easily changed later on.Program logic is written using three classes of instructions: sequential processing, selection and iteration.
Sequential Processing
These instructions do the actual data processing, such as input, output, add, subtract and copy (move).
Selection
The decision making within the program is performed by comparing two sets of data and branching to a different part of the program based on the results. In assembly languages, the compare and branch instructions are used. In high-level languages, IF THEN ELSE and CASE statements are used.
Iteration
Many functions must be repeated for some number of times and are accomplished with DO LOOPS and FOR LOOPS in high-level languages and GOTOs in assembly languages. See loop.
Program Logic |
---|
This is the overall logic of a business application, which is also defined as the main loop in a program. The logic contained within the process block can, however, be extremely complicated. |