"*"for each character in string
#2

Loops: if you know the exact amount use for(), otherwise use while(). You know the exact amount (strlen) so you use for() instead. Actually your topic title already reflected it ("for each"), although Pawn does not have a foreach construct.

pawn Код:
for(new i, j = strlen(string); i < j; i++)
{
    string[i] = '*';
}
Reply


Messages In This Thread
"*"for each character in string - by yellow - 17.01.2015, 18:48
Re: "*"for each character in string - by Vince - 17.01.2015, 18:53

Forum Jump:


Users browsing this thread: 1 Guest(s)