Block Statement in DM - Practical Electron Microscopy and Database - - An Online Book - |
||||||||
Microanalysis | EM Book http://www.globalsino.com/EM/ | ||||||||
================================================================================= | ||||||||
Because C++ is a structured and object-oriented language, DM supports the creation of blocks of code. A block is, in fact, a logically connected group of program statements that is treated as a unit. In C++ and thus DM, a code block is created by placing a sequence of statements between opening and closing curly braces {}. In this case, the braces {} is used to group several statements and variable declarations into a compound statement or block. Such block is syntactically equivalent to a single statement. Variables declared within a block are local to the local statements. Examples of blocks are:
|
||||||||
================================================================================= | ||||||||
|
||||||||