Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
The choice of C (supported by some assembler level programming) seems reasonable to me, after all C was designed as a systems language. So let me examine some of the author's code. On page 59 I find the following (after some pre-processor directives and the definition of A as a 32 by 32
staticarray of
double).
void main() { but int i, j; static n=4; double a[11][21]; void ge(); { for(j=0; j<2*n; j++) { for (i=0; i<n; i++) a[i+1][j+1] = A[i][j]; } }I will stop there because I think this is enough to scare any self respecting programmer.
Ignore the return type of main() as the code calls exit() to terminate. But what is the purpose of that
static. Surely the writer does not intend to call
mainrecursively? No he does not. I think that
staticbe
constbecause I think he wants to produce a manifest constant.
Next, why the dimensions of
a? I think, after careful study, that his intention is to ignore the zeroeth column and row and have an array with a two to one ratio between rows and columns. But what else is significant? That is why a 10 by 20 array? And so the questions mount. The code is completely incomprehensible. I know what every line does but have absolutely no idea as to how they are related.
Then we have that archaic declaration of a function inside the body of
main(). A complete waste because its first use later in the code will do just as well. A prototype out front (and a meaningful name) would be much more use.
How about that nested block on the next line? What does the writer think it does? Of course it actually does nothing.
I hope the author's knowledge of DSPs and numerical methods is of a higher standard because the book does not pass muster on the coding side.