English
Language : 

CC78K4 Datasheet, PDF (38/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 2 CONSTRUCTS OF C LANGUAGE
extern _ _ boolean data1, data2;
void testb(int x);
data1, data2.......................................................... File scope
x...................................................... Function prtotype scope
void main(void)
{
int cot ;
data1 = 1 ;
data2 = 0 ;
cot...................................................................... Block scope
while(data1) {
data1 = data2;
j1 :
testb (cot) ;
}
}
void testb(int x)
{
.
.
.
j1................................................................... Function scope
x......................................................................... Block scope
(1) Function scope
Function scope refers to the entirety within a function. An identifier with function scope can be referenced from
anywhere within a specified function.
Identifiers that have function scope are label names only.
(2) File scope
File scope refers to the entirety of a translation (compiling) unit. Identifiers that are declared outside a block or
parameter list all have file scope. An identifier that has file scope can be referenced from anywhere within the
program.
(3) Block scope
Block scope refers to the range of a block (a sequence of declarations and statements enclosed by a pair of
curly braces { } which begins with the opening brace and ends with the closing brace).
Identifiers that are declared inside a block or parameter list all have block scope. An identifier that has block
scope is effective until the innermost brace pair including the declaration of the identifier is closed.
(4) Function prototype scope
Function prototype scope refers to the range of a declared function from beginning to end. Identifiers that are
declared inside a parameter list within a function prototype all have function prototype scope. An identifier that
has function prototype scope is effective within a specified function.
38
User’s Manual U15556EJ1V0UM