Issue 90

On 10/30/2014 12:57 AM, Aidin Gharibnavaz wrote:
>
> In cli/src/selectors/id_selector.cpp:
>
> >      }
> >
> > +    /* id must be 7 characters long and all 0-9 or A-M (base-23 digit) */
> > +
> > +    std::string id = cmd_arguments[0];
> > +    bool valid_id = true;
> > +    if (id.size() == 7)
> > +    {
> > +      for (int i = 0; i < 7; i++)
> > +      {
> > +        if ((id[i] >= '0' && id[i] <= '9')
> > +         || (id[i] >= 'a' && id[i] <= 'm')
> > +         || (id[i] >= 'A' && id[i] <= 'M'))
>
> It should be 'N', not 'M'.
>
> By the way, why didn't you write
>
> |if !(all these)
> {
>    valid_id = false;
>    break;
> }
> |
>
> instead of empty braces?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/aidin36/tocc/pull/96/files#r19587848>.
>
I thought it was a little clearer the way I did it. Probably because of 
my misspent youth as a Cobol programmer, where this sort of construct is 
common. I'll change it.