Goto elimination.
This commit is contained in:
parent
c1ee521f73
commit
19553e69fc
1 changed files with 5 additions and 7 deletions
8
misc.c
8
misc.c
|
@ -282,15 +282,13 @@ long I, L, WORD;
|
||||||
* kludgey workaround, you can increment a letter by 5 by adding 50 to
|
* kludgey workaround, you can increment a letter by 5 by adding 50 to
|
||||||
* the next pair of digits. */
|
* the next pair of digits. */
|
||||||
|
|
||||||
|
|
||||||
WORD=0;
|
WORD=0;
|
||||||
I=1;
|
I=1;
|
||||||
L=LETTRS;
|
for (L=LETTRS; L != 0; L=L/100) {
|
||||||
L10: WORD=WORD+I*(MOD(L,50)+10);
|
WORD=WORD+I*(MOD(L,50)+10);
|
||||||
I=I*64;
|
I=I*64;
|
||||||
if(MOD(L,100) > 50)WORD=WORD+I*5;
|
if(MOD(L,100) > 50)WORD=WORD+I*5;
|
||||||
L=L/100;
|
}
|
||||||
if(L != 0) goto L10;
|
|
||||||
I=64L*64L*64L*64L*64L/I;
|
I=64L*64L*64L*64L*64L/I;
|
||||||
WORD=WORD*I;
|
WORD=WORD*I;
|
||||||
return(WORD);
|
return(WORD);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue