Detecting numbers?
#2

Check if the inputtext is numeric with such a function
pawn Код:
stock IsNumeric(const string[]) {
    for(new i = strlen(string); i-- >= 0; ) {
        if(!('0' <= string[i] <= '9')) {
            return false;
        }
    }
    return true;
}
Reply


Messages In This Thread
Detecting numbers? - by Jernu - 17.02.2013, 11:37
AW: Detecting numbers? - by Nero_3D - 17.02.2013, 11:58
Re: Detecting numbers? - by Jernu - 17.02.2013, 12:17

Forum Jump:


Users browsing this thread: 1 Guest(s)