+ All Categories
Home > Documents > Layout and Style

Layout and Style

Date post: 24-Feb-2016
Category:
Upload: mandel
View: 105 times
Download: 0 times
Share this document with a friend
Description:
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; } . - PowerPoint PPT Presentation
Popular Tags:
12
Layout and Style Chapter 31
Transcript
Page 1: Layout and Style

Layout and Style

Chapter 31

Page 2: Layout and Style

Outline Laying Out Control Structures Laying Out Individual Statements Laying Out Comments Laying Out Routines Laying Out Classes

Page 3: Layout and Style

Which style is better?if ( expression ) one-statement;

if ( expression ) { one-statement; }

Format single-statement blocks consistently

Page 4: Layout and Style

Which style is better?

Page 5: Layout and Style

Which style is better?

Page 6: Layout and Style

Which style is better?

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

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

Page 7: Layout and Style

Good or bad?

Page 8: Layout and Style

Good or bad?

Page 9: Layout and Style

Good or bad?

Page 10: Layout and Style

Good or bad?

Page 11: Layout and Style

Good or bad?

// comment zeroCodeStatementZero;CodeStatementOne;

// comment oneCodeStatementTwo;CodeStatementThree;

// comment zeroCodeStatementZero;CodeStatementOne;// comment oneCodeStatementTwo;CodeStatementThree;

Page 12: Layout and Style

Good or bad?


Recommended