Como faço esta função

Delphi

03/11/2004

estou com o seguinte problema , preciso testar uma condição em meu sistema , exemplo:


if variavel ´CANC´ OR ´DESC´ OR ´I´ OR ´T´ then
begin
minha rotina
end;


mas quando vou compilar da a seguinte msn:
[Error] Unit1.pas(1533): Operator not applicable to this operand type


Fábio Galvão

Fábio Galvão

Curtidas 0

Respostas

Xtreme

Xtreme

03/11/2004

if (variavel ´CANC´) and
(variavel ´DESC´) and
(variavel ´I´) and
(variavel ´T´) then
begin
minha rotina
end;


GOSTEI 0
Paulo_amorim

Paulo_amorim

03/11/2004

Olá

Ou ainda:
if not (variavel in [´CANC´, ´T´, ´I´, ´DESC´] ) then ...


Até+


GOSTEI 0
Gilvanj

Gilvanj

03/11/2004

Olá Ou ainda:
if not (variavel in [´CANC´, ´T´, ´I´, ´DESC´] ) then ...
Até+


O operador ´in´ somente está disponível para tipos de dados byte, char e enumerações. O código acima não compila no Delphi.


GOSTEI 0
POSTAR