Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.2 Example
#1
In Rule 13.2 Example

#define COPY_ELEMENT ( index ) ( a[( index )] = b[( index )] )

The print may have a space between COPY_ELEMENT and '('.
It generate
( index ) ( a[( index )] = b[( index )] ) ( i++ );

#define COPY_ELEMENT( index ) ( a[( index )] = b[( index )] )
"no space" seem proper.

Dr. Ogawa Kiyoshi
@kaizen_nagoya, http://researchmap.jp/kaizen/MISRA-C/
<t>Dr. OGAWA Kioshi<br/>
@kaizen_nagoya</t>
Reply
#2
Thank you for pointing an error in the typesetting of the document.
There should be no space between COPY_ELEMENT and its parameter list.

The line should read:
Quote:#define COPY_ELEMENT( index ) ( a[( index )] = b[( index )] )
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)