Apr 28
Notes for April 28, 1999 (lecture)

Project 5 Due Date changed
Due date: Friday May 7th
Last accepted day: Monday May 10th

No class next Monday
No office hours next Tuesday

For proper spelling capitalization and non-psudocode please refer to the handout entitled CSX Code Generation Routines (part I, page 6)

DeclField() {

}


sometimes variable delarations need calculation and subsequent assignment as follows:

Float Pi=3.14;
Float Pi2=Pi/2.0; //here you generate the assignment after the field is declared


cg () {

}


Refer to Part II of the same packet

already declared members of class CSXLib:


cg () { //readNode

};


top of page 3
cg () { //printNode

}


Control Structures
while (expr) { }

now how can we translate this?
we need to set up unique labels followed by numbers

L1:

L2:

A break means ==> L2
continue means ==> L1


top of page 4
cg () { //whileLoop

}

test it. you will see that it works for nested loops too!


cg () { //breakNode

};


Compliments, large checks drawn on US accounts, please contact Matt Pagel
(death threats, letters of unfettered devotion from males not encouraged)