Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix
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:
|