Rule 13.2 Example - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4) +--- Forum: MISRA C:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21) +---- Forum: 8.13 Side effects (https://forum.misra.org.uk/forumdisplay.php?fid=168) +---- Thread: Rule 13.2 Example (/showthread.php?tid=1020) |
Rule 13.2 Example - ogawa.kiyoshi - 21-01-2014 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/ Re: Rule 13.2 Example - misra-c - 24-01-2014 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 )] ) |