CASE HELP!!!
#1

You can use letters in cases?

E.g.

Код:
swith(function)
{
     case a: function;
     case b: function;
     case c: function;
}
? ? ?
Reply
#2

Look at this.

https://sampwiki.blast.hk/wiki/Control_Structures#switch_2
Reply
#3

Yes, you can use letters but not like that. By adding the letter inside ''

example:
pawn Код:
case 'A' .. 'Z': printf("The character is between A-Z");
case 'a' .. 'z': printf("The character is between a-z");
case '0' .. '9': printf("The character is between 0-9");
default: print("Not a valid character");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)