GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing en.wikipedia.org — Redundant code - Wikipedia In computer programming, redundant code is source code or compiled code that is unnecessary. Code that can be removed without affecting its desired behavior is redundant. CategoriesNotable categories of redundant code include:
ExamplesIn the following C code, the second int foo(int x) { int y = x * 2; return x * 2; } A more subtle example involves the C preprocessor that inserts code before compilation. Consider: #define min(A,B) ((A)<(B)?(A):(B)) int shorter_magnitude(int a, int b, int c, int d) { return sqrt(min(a*a + b*b, c*c + d*d)); } After preprocessing, the code expands to code that evaluates both int shorter_magnitude(int a, int b, int c, int d) { return sqrt(((a*a + b*b)<(c*c + d*d)?(a*a + b*b):(c*c + d*d))); } See also
References |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |