Layout and style
This presentation is the property of its rightful owner.
Sponsored Links
1 / 12

Layout and Style PowerPoint PPT Presentation


  • 151 Views
  • Uploaded on
  • Presentation posted in: General

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; } .

Download Presentation

Layout and Style

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 better1

Which style is better?


Which style is better2

Which style is better?


Which style is better3

Which style is better?

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

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


Good or bad

Good or bad?


Good or bad1

Good or bad?


Good or bad2

Good or bad?


Good or bad3

Good or bad?


Good or bad4

Good or bad?

// comment zero

CodeStatementZero;

CodeStatementOne;

// comment one

CodeStatementTwo;

CodeStatementThree;

// comment zero

CodeStatementZero;

CodeStatementOne;

// comment one

CodeStatementTwo;

CodeStatementThree;


Good or bad5

Good or bad?


  • Login