Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whats bad about Visual Foxpro
Message
From
18/07/2001 05:15:06
 
 
To
17/07/2001 16:28:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00530878
Message ID:
00531886
Views:
28
John,

>> The definitions I always used were that an interpreter converted raw source
>> or tokenized code at run-time into machine instructions. A compiler linked
>> in library modules and converted source into machine code so that very
>> little or no intepreting was done at run-time.

Consider the statement x = 10 * a - 1

In a compiler, we want the target CPU to execute the assignment at execution time. However, the code generator doesn't do any of the maths, it only generates the object code that will allow the CPU to do it when the code is executed.

An interpreter on the other hand would not produce object code for the CPU, it may produce p-code but this will not get executed by the CPU. The maths is computed immediately, as the parsing is going on. The p-code side of things is merely to take out some of the hard work that goes on like lexical analysis - speed is the keyword in interpreting statements, so p-code helps us do things like token reduction (remember in GWBasic you could use ? instead of print).

The confusion comes from the fact that a compiler is still a compiler even though it may not generate native re-locatable object code! If it generates native code ie. machine code and data that a CPU can understand (direct equivalents for the code and data bytes that the CPU uses) then its not an interpreter.
Previous
Reply
Map
View

Click here to load this message in the networking platform