First draft libsmbclient test program

Christopher R. Hertel crh at ubiqx.mn.org
Mon Nov 4 04:03:01 GMT 2002


Richard Sharpe wrote:
> 
> On Sun, 3 Nov 2002, Fabien Chevalier wrote:
> 
> >
> > Hello,
> >
> > I wrote this afternoon this small test program.
> > It does not do all what i would have liked, but it does enough to
> > begin to compare libsmbclient releases.
> 
> One minor fix. In standard C you can't declare a variable after the first
> executable statement in a function.

Um... Taken literally, that's not quite true.  You can define a variable
at the top of any block.  The thing is, the variable is only usable within
that block.

You can even create blocks without having any function, while, for, whatever
to initiate them.  Just:

  {
  long l;

  /* stuff */
  }

...anywhere within a function.

The variable 'l' is good until the closing brace.

Captain Pedantic -)-----

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the samba-technical mailing list