Contents
Page-10
Prev
Next
Page+10
Index
Variable Declarations
A variable declaration has a form such as:
var var1, var2, ..., varn : type ;
Such a declaration is processed as follows:
- Find the symbol table entry for type .
- For each variable vari ,
- Allocate storage within the current block using the storage
allocation algorithm and the size of type .
- Make a symbol table entry for the variable, filling in its
print name, type, offset, size, and block level.
- Enter the symbol in the symbol table for the current block.