Jump Table Example in PL/I
PL/I implements a jump table as an array of label variables. These may be initialized in an unusual way by using a subscripted statement label. PL/I label variables are not simply the address of the statement, but usually contain additional information on the state of the code block to which they belong.
declare lab (10) label; declare x fixed binary; goto lab(x); lab(1): /* code for choice 1 */ ; ... lab(2): /* code for choice 2 */ ; ...Read more about this topic: Branch Table
Famous quotes containing the words jump and/or table:
“Men are afraid to rock the boat in which they hope to drift safely through lifes currents, when, actually, the boat is stuck on a sandbar. They would be better off to rock the boat and try to shake it loose, or, better still, jump in the water and swim for the shore.”
—Thomas Szasz (b. 1920)
“But hospitality must be for service, and not for show, or it pulls down the host. The brave soul rates itself too high to value itself by the splendor of its table and draperies. It gives what it hath, and all it hath, but its own majesty can lend a better grace to bannocks and fair water than belong to city feasts.”
—Ralph Waldo Emerson (18031882)