[Ajuda] Op. condicionais
#3

Quote:
Originally Posted by AFerreira
Посмотреть сообщение
Eles verificam se uma vбriavel booleana retornou em true ou false
" ? " = se for true
" : " = se for false

Exemplo:
pawn Код:
new bool:LOL = true;

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    printf(" Alee й lindo? R: %s ", (LOL) ? ("Sim") : ("Nao"));
    print("--------------------------------------\n");
    return true;
}
Se " LOL " for true ele retorna imprimido:
" Alee й lindo? R: Sim "
Se " LOL " for false ele retorna imprimido:
" Alee й lindo? R: Nao "

Espero ter ajudado
what
Reply


Messages In This Thread
[Ajuda] Op. condicionais - by Rodrigo. - 02.02.2012, 23:43
Re: [Ajuda] Op. condicionais - by Abravanel - 02.02.2012, 23:45
Re: [Ajuda] Op. condicionais - by Ricop522 - 02.02.2012, 23:50
Re: [Ajuda] Op. condicionais - by Abravanel - 02.02.2012, 23:59
Re: [Ajuda] Op. condicionais - by Ricop522 - 03.02.2012, 00:01
Re: [Ajuda] Op. condicionais - by Rodrigo. - 03.02.2012, 00:01
Re: [Ajuda] Op. condicionais - by Abravanel - 03.02.2012, 00:04

Forum Jump:


Users browsing this thread: 1 Guest(s)