User Tools

Site Tools


guides:programstyle:indentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:programstyle:indentation [2020/07/24 12:51] – [A single statement occupying multiple lines] wikiadminguides:programstyle:indentation [2024/07/25 15:01] (current) – external edit 127.0.0.1
Line 72: Line 72:
                int colSize, int fillColor, int backgroundColor,                int colSize, int fillColor, int backgroundColor,
                int currentRow, int current column);                int currentRow, int current column);
 +</code>
 +
 +When declaring multiple variables of a single type it is helpful to indent each new identifier, especially when variables are initialized in the same statement.
 +
 +<code c++>
 +    int rowSize = 10,
 +        colSize = 20,
 +        fillColor = 4,
 +        backgroundColor = 7;
 </code> </code>
  
    
  
guides/programstyle/indentation.1595595112.txt.gz · Last modified: 2024/07/25 15:01 (external edit)