19.04.2011, 13:18
Well, I've noticed something, you can use strings like "this and that" or #this and that.
Example:
Which will print:
Which works great but doesn't support { } ( ) [ ], but there is a way arround it by doing "[ ]"#continued string.
It also doesn't support , but you could do ","#continue string.
This code:
Will successfully print:
~ My question is, which is faster, or which is recommended?
-----
I've also checked PAWN documents and saw that you can use integers like 1_000_000 which will print 1000000.
They said using _ will make you read the number better, works however you like.
123456 - 1_23_4_56 -> Will print 123456.
Example:
Will print:
Example:
pawn Код:
printf(#Number %d and string %s, 57, #Hello );
pawn Код:
Number 57 and string Hello
It also doesn't support , but you could do ","#continue string.
This code:
pawn Код:
printf(#This is %d and this is %s","# putting a "[ ]"# works, 56, #Lol);
pawn Код:
This is 56 and this is Lol, putting a [ ] works
~ My question is, which is faster, or which is recommended?
-----
I've also checked PAWN documents and saw that you can use integers like 1_000_000 which will print 1000000.
They said using _ will make you read the number better, works however you like.
123456 - 1_23_4_56 -> Will print 123456.
Example:
pawn Код:
new Int = 1_34___67_000;
printf( #Number %d, Int );
Will print:
pawn Код:
Number 13467000