Example
int main(void) { int i; int b; for (i = 0; i < 10; ++i) { b = i*i; } }The preceding C program, translated into three-address code, might look something like the following:
i := 0 ; assignment
L1: if i >= 10 goto L2 ; conditional jump t0 := i*i t1 := &b ; address-of operation t2 := t1 + i ; t2 holds the address of b *t2 := t0 ; store through pointer i := i + 1 goto L1
L2:
Another example:
if(aRead more about this topic: Three Address Code
Famous quotes containing the word example:
“Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.”
—Marcel Proust (18711922)