May 2002
Beginner
320 pages
6h 18m
English
Data on the stack has a location—also called an address. So does data on the heap. And so does every line of code in your program. In fact, when you read about “the flow of control,” you should actually think of a variable used by the operating system to keep track of which instruction of the program is being performed. Top-to-bottom control flow is just like moving through an array using an index or pointer.
In fact, a program to run programs might look something like Listing 15.4.
1: struct anInstruction 2: { 3: anInstructionCode InstructionCode; 4: anInstruction *NextInstruction; 5: } ; 6: 7: anInstruction *Program = 8: new anInstruction[NumberOfInstructions]; ... |
Read now
Unlock full access