/    /  Compiler Design-Symbol Table Representation (2)

Symbol Table Representation (2)

 

Fixed Length:

NameType
axxxxxxxxxint
bxxxxxxxxxint
cxxxxxxxxxint
Sumxxxxxxxint
Percentagefloat
readdatafun()

 

0a
1$
2b
3$
4c
5$
6s
7u
8m
9$
10p
11e
12r
13c
14e

 

15n
16t
17a
18g
19e
20$
21r
22e
23a
24d
25d
26a
27t
28a
29$

 

The above tables depict the variable length.

 

In variable-length memory is not wasted whereas in fixed-length the memory is wasted.

Starting IndexLengthType
02int
22int
42int
64int
1011float
219junction

 

In fixed-length table represents the maximum name of the variable is taken and allocated memory to all variables as same.

 

Reference Link

Symbol Table Representation (2)