Special Discussion.
#1

Well, I've noticed something, you can use strings like "this and that" or #this and that.

Example:
pawn Код:
printf(#Number %d and string %s, 57, #Hello );
Which will print:
pawn Код:
Number 57 and string Hello
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:
pawn Код:
printf(#This is %d and this is %s","# putting a "[ ]"# works, 56, #Lol);
Will successfully print:
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
Reply


Messages In This Thread
Special Discussion. - by Zh3r0 - 19.04.2011, 13:18
Re: Special Discussion. - by maij - 19.04.2011, 13:30
Re: Special Discussion. - by Zh3r0 - 19.04.2011, 13:38
Re: Special Discussion. - by maij - 19.04.2011, 13:49
Re: Special Discussion. - by Zh3r0 - 19.04.2011, 13:50

Forum Jump:


Users browsing this thread: 1 Guest(s)