Changeset 459
- Timestamp:
- Aug 24, 2006, 7:10:24 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
CodingStyle.txt (modified) (2 diffs)
-
select.tmp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CodingStyle.txt
r392 r459 1 1 2 2 Coding Style Guide 3 ================== 4 5 Line lengths 6 7 Try to keep lines less than 80 characters. 8 9 Break lines after logical separators 10 11 Vertically align like constructs 3 12 4 13 Indents 5 14 6 Start function with{ in column 115 Place function definition { in column 1 7 16 8 Intent by 2 characters17 Place function definition } in column 1 9 18 10 Layouts19 Intent nested constructs by 2 characters 11 20 12 if (expr) { 13 } 14 else { 15 } 21 void func() 22 { 23 stmt 24 if (expr) 25 stmt2 26 } 16 27 17 while (expr) { 18 } 28 Tabs 19 29 20 for (expr) { 21 } 30 Use only 8 column tabs 31 32 Layouts 33 34 if (expr) 35 statement 36 37 // If expr and statement are brief 38 if (expr) statement 39 40 if (expr1) { 41 } 42 else { 43 } 44 45 // If expression must be wrapped 46 // align like constructs vertically 47 if (expr1 && 48 expr2)) 49 { 50 } 51 52 while (expr) { 53 } 54 55 for (expr; expr; expr) { 56 } 57 58 typedef struct { 59 60 } TYPENAME; 61 62 Variable definitions 63 64 Define one per line 65 66 INT a; 67 INT b; 68 69 not 70 71 INT a,b; 72 73 Spaces 74 75 Separate keywords from leading paren with 1 space 76 77 if (expr) dothis 78 79 No space between function name and leading paren 80 No space between last arg and trailing paren 81 82 func() 83 84 Follow separating commas and semicolons with a space 85 86 x = func(a, c) 87 88 Surround binary operators with a leading and trailing spaces 89 90 x = a + b 91 92 Try to avoid spurious internal and trailing whitespace 22 93 23 94 Memory … … 32 103 Windows 33 104 34 - Check all WinCreateWindow call 105 - Check all WinCreateWindow calls 35 106 - Check QWL_USER pointer data 36 107 37 Beeps108 Error notifications 38 109 39 DosBeep(50,100) Alert user to failure - must include visual action 110 DosBeep(50,100) Alert user to operator error 111 Use only when failure reason is obvious 40 112 113 saymsg Alert user to operator error with popup 114 115 Runtime_Error Report "should not occur" errors 116 Dos_Error 117 Win_Error 41 118 42 119 $Id$ -
trunk/select.tmp
r2 r459 13 13 10008 14 14 ; 15 Select Dirs 16 +Dirs 17 0 18 10010 19 ; 20 Select List 21 +List 22 0 23 10033 24 ; 15 25 Select Mask 16 26 +Mask … … 22 32 0 23 33 10007 34 ; 24 35 Deselect Dirs 25 36 -Dirs 26 37 0 27 38 10011 39 ; 40 Deselect Files 41 -Files 42 0 43 10009 28 44 ; 29 45 Deselect Mask … … 56 72 0 57 73 4900 74 ; 75 ; $Id$
Note:
See TracChangeset
for help on using the changeset viewer.
