Introduction
If you want a computer to do something, a program is required. RAPID is a programming language for writing such a program. The native language of computers consists of only zeros and ones.
This is virtually impossible for humans to understand. Therefore computers are taught to understand a language that is relatively easy to understand - a high level programming language. RAPID is a high level programming language, it uses some English words (like IF and FOR) to make it understandable for humans.
Example
Let us look at a simple example to see what a RAPID program can look like with a program that calculates the area of a rectangle and writes it on the FlexPendant:
MODULE MainModule
VAR num length;
VAR num width;
VAR num area;
PROC main()
length := 10;
width := 5;
area := length * width;
TPWrite "The area of the rectangle is " \Num:=area;
END PROC
ENDMODULE
The output is:
The area of the rectangle is 50.