What does this line means?
#2

I never knew how to do it, but I know what's for, and what it means. ? is Conditional operator it's used in c++ also. The Conditional operator returns the value in any number or bool you would like. It's formated like this:
Код:
YourStatement ? option1 : option2
A example of this is.
Код:
if(2+2==4) ? true : false; // I think that's how you do it
edit: This is what the PAWN manual says, maybe this can help
Quote:
Originally Posted by Manual
In a case statement and in expressions in the conditional operator
(“ ? : ”), any expression that has a tag override should be enclosed
between parentheses, to avoid the colon to be misinterpreted
as a separator of the case statement or as part of the conditional
operator.
Reply


Messages In This Thread
What does this line means? - by SiJ - 04.04.2010, 18:57
Re: What does this line means? - by Carlton - 04.04.2010, 19:13
Re: What does this line means? - by SiJ - 04.04.2010, 19:18

Forum Jump:


Users browsing this thread: 1 Guest(s)