/* Example programs from the book Scientific and Engineering Programming in C++: An Introduction with Advanced Techniques and Examples, Addison-Wesley, 1994. (c) COPYRIGHT INTERNATIONAL BUSINESS MACHINES CORPORATION 1994. ALL RIGHTS RESERVED. See README file for further details. */ void simple1() { { int i = 0; } int i = 3; float x = 10.0; i = 5; x = 12.1; { float x = 12.1; float& a = x; } union { float r; int j; }; if (x < 0) x = -x; // x = abs(x) x = (x < 0) ? -x : x; // x = abs(x) { for (int i = 1; i <= 10; i++) { // Loop body } } { float x[100]; } { float x[3] = {1.1, 2.2, 3.3}; } { float x[] = {1.1, 2.2, 3.3}; } { int m[2][3] = { {1, 2, 3}, {4, 5, 6} }; } }