oops,
make this comma in the for loop head a semicolon...
> /*
> * STR: I string containing symbols
> * AL: I alphabet to put symbols in order
> * RET: O result in integer format
> * return value: O number of symbols put into the integer
> */
> char stoi_al(char *str, char *al, unsigned int *ret)
> {
> int i;
> unsigned int n = 0, base, c = 0;
> char *ind;
>
> base = strlen(al);
> for (i = 0, str[i]; i++)
> {
> if (!(ind = strchr(al, str[i]))) break;
> n = n * base + ind - al;
> c++;
> }
> *ret = n;
> return c;
> }
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user