[Instructions] [Search] [Current] [Syllabus] [Handouts] [Outlines] [Assignments]
Held Monday, November 16, 1998
Notes
case statement?
switch (x) {
case 1 : ...
case 2 : ...
case 3 : ...
case 4 : ...
default: ...
}
CJUMP LT x 1 def CJUMP GT 4 def JUMP x (c1,c2,c3,c4) c1: code for case 1 JUMP end c2: code for case 2 JUMP end c3: code for case 3 JUMP end c4: code for case 4 JUMP end def code for default case JUMP end end: whew!
switch (exp) {
case 1..10: ...
case 100..120: ...
case 1000..2000: ...
...
}
CALL
operation).
History
Back to Translating control structures. On to Canonical trees.
[Instructions] [Search] [Current] [Syllabus] [Handouts] [Outlines] [Assignments]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Mon Nov 16 12:49:20 1998.
This page generated on Mon Nov 16 12:49:46 1998 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu