Software Engineering Measurement

A2.7 Definitions

A2.7.1 Definition of a String Constant

A string constant is delimited by a starting " and an ending ". For example, the C function printf () uses string constants:

printf(" Hello World ");

The content of the string constant does not play any role in determining the metrics but a string constant itself can be an operand.

A2.7.2 Definition of a Character Constant

A character constant starts with ' and ends with '. For example, the assignment of a character variable:

a = 'b';

Semicolons and operators appearing in character constants are not relevant for counting the statement or operator metrics.

A2.7.3 Definition of a for Structure

A for has the following form:

for (expression1; expression2; expression3) expression;

The semicolons between the brackets do not play a role in determining the statement metric count. They do not delimit a statement but serve to separate expressions.

Категории