GARANTIR DESCONTO

Fórum Que tipo de variavel eu coloco para usar como conjunto ? #267831

09/02/2005

0

Que tipo de variavel eu coloco para usar como conjunto ?

if 1 in VARIAVEL then




Muito grato desde já!


Programadorjlle

Programadorjlle

Responder

Posts

09/02/2005

Marcio.theis

Você poderia explicar melhor?


Responder

Gostei + 0

09/02/2005

Programadorjlle

if 1 in [0..9] then ´DA CERTO´
if 1 in VARIAVEL then ´QUALQUER TIPO DE VARIAVEL DA ERRRADO´

Queria saber substituo o conjunto por uma variavel ?

[quote:7fe27daa70=´/]/]@t´]Você poderia explicar melhor?[/quote:7fe27daa70]


Responder

Gostei + 0

09/02/2005

Marcio.theis

O que eu acredito que se possa fazer é o seguinte:

if 1 in [variavel..variavel2] then

mas

if 1 in [variavel] then

somente se for exatamente igual a sua variável.


Responder

Gostei + 0

09/02/2005

Programadorjlle

MAIS TEM COMO FAZER COMO UMA STRING PQ NAO É UM VALOR SOH ?
var
axSTR : String;
begin
axSTR := ´0,1,2,3´;
if 1 in [axSTR] then begin
end;
end;



[quote:44a1738317=´/]/]@t´]O que eu acredito que se possa fazer é o seguinte:

if 1 in [variavel..variavel2] then

mas

if 1 in [variavel] then

somente se for exatamente igual a sua variável.[/quote:44a1738317]


Responder

Gostei + 0

09/02/2005

Vprates

Não sei se eh o certo mas vc poderia utilizar um stringlist tipo:
Var Stl : TStringlist;
I: Integer;
Begin
Stl := TStringlist.create;
stl.Texte := String1, String2, etc...
For I:=0 to Stl.count-1 do
if 1 in stl[I] then
faz oque vc precisa;

Não testei mas acho que eh isso...
vlw


Responder

Gostei + 0

09/02/2005

Nildo

Como a duvida se transformou em outra, eu respondí aqui:

http://forum.clubedelphi.net/viewtopic.php?t=58384


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar