Home Segments Index Top Previous Next

408: Mainline

A global variable of type cylinder identifies the address in memory where the allocated memory begins for a cylinder object:

     *----- Cylinder variable identifies the byte where a 
     |      cylinder class object begins 
     | 
     |    radius          length 
     |      |               | 
     v      v               v 
     --------------- --------------- 
 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
  | | | | | | | | | | | | | | | | | | | | | | 
   -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 
     ^               ^               ^ 
     |               |               | 
    288             296             304 

In the illustration, the radius and length are assumed to be floating-point numbers of type double.