Questions tagged as 'operadores'

2
answers

"if" does not match the [closed]

I'm trying to apply a if to my code, but it's coming wrong: <?php echo $usu_id . "<br />"; echo $centraliz . "<br />"; echo $marca . "<br />"; if($centraliz = "S"){ echo "É centralizada"; } else { echo "Não...
asked by 25.10.2017 / 12:44
2
answers

What does the expression "! (errS & errE)" in the if?

In a part of a code that I need to understand, a new syntax appeared for me in if : if (!(errS&errE)) { fprintf(stderr, "\nFALTA ARGUMENTOS\n"); if(!errS) fprintf(stderr, "-s NOME ARQUIVO SAIDA \n"); if(!errE)...
asked by 04.04.2018 / 08:47
1
answer

Is table test result not the same as compiled?

The code below when executed returns the result for m = 0 , but doing the table test the result should be -2 . I can not prove 0 as a result unless the variable t++ when in (t * t++) , only this moment and only...
asked by 05.10.2018 / 06:04
3
answers

What does the expression '' 2 pigs' + '3 horses' ==' 5 animals' "return true in PHP? [duplicate]

I've already asked a similar question here in StackOverlow at: However, taking a look at some of the strange things that exist in PHP, I have seen that the following expression returns true . var_dump('2 porcos' + '3 cavalos' == '...
asked by 02.09.2015 / 18:29
1
answer

error expected primary-expression before '' token [closed]

Error on line 21. #ifndef __STRING_H__ #define __STRING_H__ #pragma warning(disable: 4786) #include <string> #include <vector> const int MAX_RESP = 4; typedef std::vector<std::string> vstring; bool isPunc(char c); void c...
asked by 29.05.2016 / 17:59
1
answer

What is the best way to use different logical operators in the same condition? [closed]

I need to use two different logical operators in same condition . How to do it right? I did it this way: if($planohabilitargestao!="1000" || $planohabilitargestao!="200" || $planohabilitargestao!="10000" && $usuario=="") Even...
asked by 29.03.2016 / 16:08