To understand better the need for compilation, consider the following analogy.
Suppose you were to give driving instructions on how to get somewhere. If you were giving them to a human, these instruction might look like:
Leave downtown heading east.
As soon as you see the city limits sign turn right
Drive until you see a MacDonalds
Take the first major roundabout heading north
etc…
The above is the equivalent of macro code, rich and full-featured; each instruction requires detailed analysis.
Now suppose you were to build a device that would drive your car automatically, by following a sequence of instructions. Obviously you would not want to feed the above type of instructions into it. The type of instructions you would feed to a car would be something like:
Engine ON.
Shift into gear.
Accelerate to 50 km/h
Drive 5.5 km
Slowdown to 10 km/h
Turn right
Accelerate to 50 km/h
Drive 10 km
etc…
Note that this "car code" contains a lot fewer different instructions, and they are a lot less open to interpretation.
That is the equivalent of compiled code. The compiler translates the human language instructions (Macros) into instructions adapted to the computer.
Topic 125001, last updated on 22-Apr-2020