|
|
Авторизация |
|
|
Поиск по указателям |
|
|
|
|
|
|
|
|
|
|
Kernighan B.W., Plauger P.J. — The elements of programming style |
|
|
Предметный указатель |
null THEN 47
numerical hazards 4 42 118
off by one error 51 66 95 105 106 108 113
ON ENDFILE statement 65 86 88
one routine per page 150
operator precedence ambiguity 14 21 102
operators, boolean 20
operators, relational 20
optimization, premature 61
order of decisions 38 44 47
order of decisions, forcing 45
output conversion 130
output scale factor 84
outsmarting the compiler 11
Overflow 18 132
overwriting, storage 51 85
PARAMETER 12
Parameters, default 94
Parameters, named 94
Parenthesization 14 102
patching bad code 71 110
Patterns, repeated 12 13 21 43 60
performance bug 13 136
PL/I checkout compiler 6 105
plausible input data 84
Plotting program 57
polynomial integration program 116
Portability 6 93 97
premature optimization 61
preprocessors, Fortran 39
Prime number program 128 146
Profiler 136
program complexity 16 76 95
program description 85 141
Program format 146 148 150
program revision 54 155
Program testing 69 101 112 116
program, airplane weight 43
program, average-computing 113
program, binary search 107 110
program, blank-counting 10
program, bowling 36 145
program, change-making 48
program, checker-playing 60
program, color-counting 86
program, current-computing 103
program, customer account 66
program, date conversion 52
program, dating-service 19
program, dice simulation 57
program, electric bill 125
program, employee wage 123
program, Euclidean Algorithm 130
program, factorial 126 129
program, Gauss — Seidel iteration 150
program, input conversion 99
program, integration 120
program, interchange sort 132
program, logarithm 117
program, median 63
program, metal cost 90
program, minimum-computing 9
program, monthly payment 107
program, mouse in a maze 69
program, plotting 57
program, polynomial integration 116
program, prime number 128 146
program, quadratic equation 40
program, right triangle 118
program, Shell sort 134
program, sin(x) 101
Program, sorting 5 18 56
program, sparse matrix 22
program, square root 3 8
program, student grade 88 136
program, tax computation 58
program, text-centering 50
program, trapezoidal integration 23 62
program, triangle 12
program, triangle area 84
program, word-counting 29 95 100
Programming, structured 39
Pseudo-code 39 41 66 95 102 114
pseudo-code as documentation 141
pseudo-code, style in 41
quadratic equation program 40
random indentation 18 24
random statement numbering 5 20 84 132 145
range checking, subscript 85
Ratfor Fortran preprocessor 39
READCH character input function 97
rearranging decisions 38 44 46
recoding in assembly language 138
Recursion 73 166
recursion in Fortran 77
Recursive data structures 77
redundant test 33 43 46 60 124 148 150
Redundant variables 113
reference outside array bounds 51 85 106 112
refinement, successive 41 71
Relational operators 20
relational tests, rewriting 3 31 47
relative vs. absolute test 4 8 118
repeated patterns 12 13 21 43 60
revision, program 54 155
rewriting relational tests 3 31 47
right triangle program 118
| Robust code 29 85 96 115
rules for criticism 6
rules, De Morgan's 21
run-time comparisons, sorting 133 134 135
sandpiles, floating point numbers as 117
scale factor, output 84
Separate compilation 59
separate input function 65 67 71 94 150
Shell sort program 134
Sieve of Eratosthenes 139
sin(x) program 101 119
sort, simple interchange 133
Sorting program 5 18 56
sorting run-time comparisons 133 134 135
Sorting, insertion 105
sparse matrix program 22
special cases, avoiding 112 126 130 131
square root program 3 8
square root, Newton's method for 4
Standard Fortran 6
statement numbering, random 5 20 84 132 145
statement, arithmetic IF 16 131 132 145
statement, BEGIN-END 31
statement, CASE 37
statement, computed GOTO 17
statement, DO 34
statement, DO-END 31
statement, DO-WHILE 34
statement, ELSE 32
statement, ELSE IF 37
statement, END= 86 97
statement, GET DATA 94
statement, IF 17 31
statement, indentation of ELSE IF 38 147
statement, logical IF 16 17 85
statement, NAMELIST 94
statement, null ELSE 18 45 47 125
statement, ON ENDFILE 65 86 88
statements in Fortran, grouping of 32
statements, grouping of 31
statements, variables in FORMAT 51
storage overwriting 51 85
structured design 77
Structured programming 39
Strunk, W. xii
student grade program 88 136
style in pseudo-code 41
subconscious acceptance of comments 142
subroutines 13
subscript range checking 85
subscript, asterisk 88
SUBSCRIPTRANGE condition 85
SUBSTR function 10
Successive refinement 41 71
tax computation program 58
telephone test 21
temporary variable 11 18 24 108 124 126
test, divisibility 53 63 91
test, end of file 65 88 97
test, redundant 33 43 46 60 124 148 150
test, relative vs. absolute 4 8 118
Testing, boundary condition 112
testing, program 69 101 112 116
tests, convergence 4 8
tests, floating point equality 118 120
tests, rewriting relational 3 31 47
text-centering program 50
THEN GOTO 17
THEN IF 44 47
timing package 135
top to bottom flow 25 37 39 66 76 89 108 124
Top-down design 41 71
trapezoidal integration program 23 62
triangle area program 84
triangle program 12
TRUNC function 63
truncating integer division 1 49 53 91 128
truncation, floating point 4 116 118
Type conversion 12 24
type declaration, explicit 14 153
type declaration, implicit 14 104 153
type, incorrect data 13
typographical error 5 13 15 45 48 110 125 143
Undeclared variable 24 104
Underflow 18 102 132
uniform input format 92
uniform input formats 93
UNIX operating system xii
unsafe variable names 15
useless comments 142
validating input data 84 91 150 151
variable names, mnemonic 11 14 15 104 144
variable names, unsafe 15
variable, temporary 11 18 24 108 124 126
Variable, undeclared 24 104
variables in FORMAT statements 51
variables, commenting 150
variables, comparing LOGICAL 19
variables, declaring all 14
variables, non-local 24 62
variables, redundant 113
WATFIV 39 85 105
Weinberg, G. M. xii 142
White, E. B. xii
word-counting program 29 95 100
wrong branch on equality 107 125 142
zero times, loop done 51 109 111 112 131
Zero, division by 4 13 152
|
|
|
Реклама |
|
|
|