-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
The earliest programming languages had a fixed set of types. Functions and subroutines in Fortran 77 could only receive arguments and return results that were of one of the types supported by the language (e.g., INTEGER*4 for a 4-byte integer or CHARACTER*10 for text that is 10 bytes long).This level of abstraction is far from complete, and as programming languages evolved, they introduced ways for the user to refer to more complex information. Just like with the example of unsigned int in the previous section, the language will need to understand what the set of all possible values that could be represented by that user-defined type is.The way in which those user-defined types are supported by the language is also profoundly influential to how the execution of the code is handled. Let’s look at another example in C:
#include <stdbool.h>
struct point {
int x;
int y;
};
bool is_same_point(struct...
Change the font size
Change margin width
Change background colour