In general, the semicolon
is used on all stand-alone command lines (not bounded by brackets or parentheses).
Functions are used to modify the flow of a program. When a call to a function is made,
the execution of the program temporarily jumps to the function. After execution of the
called function has completed, the program continues executing on the line following the
call. This will make more sense during our later discussion of stack operation.
Variables
Variables are used in programs to store pieces of information that may change and may
be used to dynamically influence the program.
Table 6-1 shows some common types of variables.
When the program is compiled, most variables are preallocated memory of a fixed
size according to system-specific definitions of size. Sizes in the table are considered typical;
there is no guarantee that you will get those exact sizes. It is left up to the hardware
implementation to define this size.However, the function sizeof() is used in C to ensure
the correct sizes are allocated by the compiler.
Variables are typically defined near the top of a block of code. As the compiler chews
up the code and builds a symbol table, it must be aware of a variable before it is used in
the code later.
Pages:
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276