SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
Workbook HEPIC Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Wkbk. Search
Wkbk. Sitemap
Introduction
Non SLAC
HOWTO's
Introduction
Logging In
QuickTour
Detector
Info Resources
Software Infrastructure
CM2 Introduction
Unix
OO
SRT
Objectivity
Event Store
Framework
Beta
Modifying Code
Writing and Editing
Compiling
Debugging
Analysis
Framework II
Analysis
Find Data
Batch Processing
PAW
PAW II
ROOT I
ROOT II
ROOT III
Advanced Infrastructure
New Releases
Workdir
Main Packages
Event Displays
Gen/Sim/Reco
Contributing Software
SRT and CVS
Coding
Advanced Topics
Make CM2 Ntuples
New Packages
New Packages 2
Persistent Classes
Java
Site Installation
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Example of Nested Code

void Function1(){ //begin function body
 
 //code for Function1 indented one level
 double time;  //time on stack
 statement one;
 statement two;

 if (condition) {//begin if body
   
   //code for if statement indented two levels
   bool test;  //test on stack
   then execute this code;
   
   while (condition){ //begin while body
     //code for while statement indented three levels
     int x;  //x on stack
     Function2();
     and so forth;
   
   }//innermost closes first, end while body, x out of scope
   
   another statement; //part of if statement body 
   onemore statement;
 
 }//second innermost, end if body, test out of scope
 
 //more Function1 statements would go here

}//outermost last, Function1 body, time out of scope

Last edited by: Jenny Williams

Last modification: 11 Mar 2001
Last significant update: ?1999