[sclug] sclug Digest, Vol 72, Issue 14

Neil Haughton haughtonomous at googlemail.com
Fri Sep 25 13:57:46 UTC 2009


> >
> >                         if (TemporaryDataStore.MoveToMemory(dataRows) ==
> > false)
> >                         {
> >                             //do nothing
> >                         }
> >                         else
> >                         {
> >                             ProcessData(dataRows);
> >                         }
> >
> >
>
> I'm going to stick my head above the parapet again for a few minutes
> because I'm interested in this.
>
> Having had no formal training in coding (largley taught myself), my code
> tends to look a bit like that, maybe with a comment above it reminding
> me of my intention. I'd be interested to know why it's not acceptable,
> largley in the interest of improving myself!
>
>
It boils down to


if (TemporaryDataStore.MoveToMemory(dataRows))
{

>             ProcessData(dataRows);
>


or, if you must:

if (TemporaryDataStore.MoveToMemory(dataRows)==true)

>             ProcessData(dataRows);
>


which, (either of these) being the simpler form, is the one to use. It is
more intuitive to read, it is (IMHO) clearer,



More information about the Sclug mailing list