The importance of showing ALL of the code in C

From: Ram Meenakshisundaram <rmeenaks_at_olf.com>
Date: Wed Feb 6 12:43:52 2002

"Fred Cisin (XenoSoft)" wrote:

> Two more common mistakes: (that means ones that I do frequently)
>
> N = 2;
> X = 3;
> . . .
> if (x > 10);

                        ^ BAD semicolon

>
> {
> return(N);
> }
> N = 7;
> return(N);
>
> and:
>
> N = 2;
> X = 3;
> . . .
> if (x = 10)

               ^ BAD equal

>
> {
> return(N);
> }
> N = 7;
> return(N);
>
> Look for why both sections return 2 instead of 7.

:-)

--
       ,,,,
       /'^'\
      ( o o )
 -oOOO--(_)--OOOo-------------------------------------
|                        Ram Meenakshisundaram        |
|                        Senior Software Engineer     |
|                        OpenLink Financial Inc       |
|  .oooO                 Phone: (516) 227-6600 x267   |
|  (   )   Oooo.         Email: rmeenaks_at_olf.com      |
 ---\ (----(   )--------------------------------------
     \_)    ) /
           (_/
Received on Wed Feb 06 2002 - 12:43:52 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:44 BST