fir
2024-08-29 12:25:23 UTC
see such code
long long unsigned tag ;
void foo(long long unsigned tag)
{
if(tag=='warsaw') printf("\nwarsaw");
if(tag=='paris') printf("\nparis");
if(tag=='new york') printf("\nnew york");
if(tag=='old york') printf("\nold york");
if(tag=='very old york') printf("\nvery old york");
}
int main(void)
{
foo('warsaw');
foo('paris');
foo('new york');
foo('old york');
foo('very old york');
return 'bye';
}
and maybe guess the result (or how it should be)
(later i may tell you)
the problem is how to make it work i want to use that kind of
'tags' and would like to use it assuming at least 8 characters
work okay i mean the code above would "catch" only on proper tag and
each one would be printed one time
right now it dont - is thsi a way to make it work
(maybe except the last one as i understand
if(tag=='old york') printf("\nold york");
if(tag=='very old york') printf("\nvery old york");
may be treated as the same
(i need it to work on 32 bit old mingw/gcc)
?
long long unsigned tag ;
void foo(long long unsigned tag)
{
if(tag=='warsaw') printf("\nwarsaw");
if(tag=='paris') printf("\nparis");
if(tag=='new york') printf("\nnew york");
if(tag=='old york') printf("\nold york");
if(tag=='very old york') printf("\nvery old york");
}
int main(void)
{
foo('warsaw');
foo('paris');
foo('new york');
foo('old york');
foo('very old york');
return 'bye';
}
and maybe guess the result (or how it should be)
(later i may tell you)
the problem is how to make it work i want to use that kind of
'tags' and would like to use it assuming at least 8 characters
work okay i mean the code above would "catch" only on proper tag and
each one would be printed one time
right now it dont - is thsi a way to make it work
(maybe except the last one as i understand
if(tag=='old york') printf("\nold york");
if(tag=='very old york') printf("\nvery old york");
may be treated as the same
(i need it to work on 32 bit old mingw/gcc)
?