TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
ASML C Coding Standard
Search

Rule:  6.7.1.aChecked automatically with code checker

Synopsis:Identifiers with file scope shall be declared static, thus preventing them from having global scope.
Language:C
Severity Level:4
Category:Declarations


Description:

Justification

Giving identifiers wider scope than is necessary can easily lead to problems and reduces re-usability.

Example

bool dbl_equal(double a, double b); /* global scope */

static int ccbb_compare(int i1, int i2); /* file scope */

int ccbb_public; /* external scope */

static int ccbb_private; /* file scope */