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

Rule:  6.5.2.3.aChecked automatically with code checker

Synopsis:When structures are accessed by means of a pointer, the pointer-to notation -> rather than the member notation * shall be used to denote a specified member of the structure.
Language:C
Severity Level:8
Category:Expressions


Description:

Justification

The pointer-to notation is more clear when reading the code, since it looks less cluttered and it becomes obvious that a member of a struct or union is meant.

Example

i = p->value; /* RIGHT */
i = (*p).value; /* WRONG */