Randoms
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not inefficient code - it compiles to EXACTLY the same thing as if the braces had been ommitted, and is (IMHO) much clearer to read than something all squashed together (as you wrote).
Have I mentioned it was inefficient? My reference towards code optimizations was only meant to state if/when executing a singular statement or function it may be called after the preceding instruction. I have not stated that this is the ideal way of grouping single statements but a minor note.

pawn Код:
it compiles to EXACTLY the same thing as if the braces had been ommitted, and is (IMHO) much clearer to read than something all squashed together (as you wrote).
It is not squished together, and as a programmer, I'm hoping you understand that actually IS easier and much clearer to read. An example from my tutorial.

pawn Код:
#define while2(%0=%1;%2) %0=%1; while(%2)
main()
{
    while2(new i=100; i--)
    {
        printf("%d",i);
    }
}

pawn Код:
#define while2(%0=%1;%2) %0=%1; while(%2)
main()
{
    while2(new i=100; i--) printf("%d",i);
}
Reply


Messages In This Thread
Randoms - by Rob_Maate - 02.12.2011, 11:40
Re: Randoms - by Sinc - 02.12.2011, 11:49
Re: Randoms - by Kostas' - 02.12.2011, 11:49
Re: Randoms - by Sinc - 02.12.2011, 11:53
Re: Randoms - by Rob_Maate - 02.12.2011, 12:08
Re: Randoms - by titanak - 02.12.2011, 12:11
Re: Randoms - by Rob_Maate - 02.12.2011, 12:39
Re: Randoms - by Sinc - 02.12.2011, 12:47
Re: Randoms - by Dark_Kostas - 02.12.2011, 13:31
Re: Randoms - by Sinc - 02.12.2011, 13:43

Forum Jump:


Users browsing this thread: 4 Guest(s)