Layout and style
Download
1 / 12

Layout and Style - PowerPoint PPT Presentation


  • 201 Views
  • Uploaded on

Layout and Style. Chapter 31. O utline. Laying Out Control Structures Laying Out Individual Statements Laying Out Comments Laying Out Routines Laying Out Classes. Which style is better?. if ( expression ) one-statement; . if ( expression ) { one-statement; } .

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Layout and Style' - mandel


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Layout and style

Layout and Style

Chapter 31


O utline
Outline

  • Laying Out Control Structures

  • Laying Out Individual Statements

  • Laying Out Comments

  • Laying Out Routines

  • Laying Out Classes


Which style is better
Which style is better?

if ( expression )

one-statement;

if ( expression ) {

one-statement;

}

Format single-statement blocks consistently




Which style is better3
Which style is better?

ReadEmployeeData(maxEmps,empData,inputFile,empCount,inputError);

ReadEmployeeData(maxEmps, empData, inputFile, empCount, inputError);






Good or bad4
Good or bad?

// comment zero

CodeStatementZero;

CodeStatementOne;

// comment one

CodeStatementTwo;

CodeStatementThree;

// comment zero

CodeStatementZero;

CodeStatementOne;

// comment one

CodeStatementTwo;

CodeStatementThree;