1
I have a situation where something like this happens:
procedure FrmTeste.Teste;
var
iSinc: LongInt;
const
ACAO_PROX: LongInt = $0008;
begin
iSinc := iSinc or ACAO_PROX;
end;
I couldn’t figure out what amount iSinc gets when entering this function, which actually happens?
But what it means to make this comparison, what it will say if iSinc is true, or Acao_prox is true?
– William
I edited the answer
– Roberto de Campos
All right, I got it so far, but what I want to know is: iSinc can be true by being a positive integer?
– William
@William does not know Delphi, but C and other languages assume that 0 is false and anything else is true. So if Delphi assumes this behavior as well, a numeric can be treated as boolean
– Jefferson Quesado
Exactly that @Jeffersonquesado no Delphi é mesma coisa, 0 é false e qualquer outro número inteiro é true
– Roberto de Campos