How to set string[] to uprercase?
#8

Quote:
Originally Posted by LarzI
Посмотреть сообщение
Are you doing ++i just for user preference, or is it actually faster to do that instead of i++ ?
I highly doubt there is a speed difference, but if there was, the difference would be far beyond human comprehension.

but the differences in code however are as follows.
pawn Код:
main()
{
    new
        a = 10,
        b = 10;

    printf("A with pre-increment: %d", ++a);
    printf("A after pre-increment: %d", a);

    printf("B with post-increment: %d", b++);
    printf("B after post-increment: %d", b);   
}
prints out
Код:
[18:19:14] A with pre-increment: 11
[18:19:14] A after pre-increment: 11
[18:19:14] B with post-increment: 10
[18:19:14] B after post-increment: 11
++x is basically like adding 1 to the variable before executing the line
x++ is basically like adding 1 to the variable after executing the line
Reply


Messages In This Thread
How to set string[] to uprercase? - by Azazelo - 12.12.2012, 20:57
Re: How to set string[] to uprercase? - by ReneG - 12.12.2012, 21:53
Re: How to set string[] to uprercase? - by LarzI - 12.12.2012, 21:58
Re: How to set string[] to uprercase? - by ReneG - 12.12.2012, 22:15
Re: How to set string[] to uprercase? - by Azazelo - 12.12.2012, 22:29
Re: How to set string[] to uprercase? - by LarzI - 12.12.2012, 23:17
Re: How to set string[] to uprercase? - by Frant1kz - 12.12.2012, 23:58
Re: How to set string[] to uprercase? - by ReneG - 13.12.2012, 00:04

Forum Jump:


Users browsing this thread: 1 Guest(s)