Easy-to-answer question about #define value
#4

Quote:
Originally Posted by currencyinstacks
Посмотреть сообщение
Well yes.

Код:
#define VALUE 1

new getvalue = VALUE;
if(getvalue == 1)
{
    //the value is 1
}
The defines themselves don't use memory, as they're 'replaced' at compile time.

For example:
pawn Код:
#define VALUE 5
if(VALUE == 5)
Would, after compile, become:
pawn Код:
if(5 == 5)
I recommend you read the PAWN language guide.
Reply


Messages In This Thread
Easy-to-answer question about #define value - by Danny - 04.12.2011, 10:28
Re: Easy-to-answer question about #define value - by AndreT - 04.12.2011, 10:29
Re: Easy-to-answer question about #define value - by currencyinstacks - 04.12.2011, 10:31
Re: Easy-to-answer question about #define value - by Ash. - 04.12.2011, 10:33

Forum Jump:


Users browsing this thread: 2 Guest(s)