Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[flashMX04] Evaluation d'un expression dans un IF THEN ELSE

1 réponse
Avatar
Tops20
Salut a tous
je veux evaluer une condition dans un if,
j'arrive bien a extraire ma contition, mais in ne veux pas l'evaluer ou tout
juste renvoyer false or true !

code ;
ProdFamCode = 2000;
criteres = "ProdFamCode<=1199 or ProdFamCode>=6000";
trace("---"+eval(riteres) );
trace("---"+this );
trace("---"+ );
if (this){
trace("bloblo")
}else{
trace("blibli")
}

Merci d'avances pour vos lumieres
@+
Tops

1 réponse

Avatar
Ned
Salut

"or" ?
ça serait pas plutot :

criteres = eval("(ProdFamCode<99)||(ProdFamCode>`00)");

?

ensuite, tu fais un eval de "riteres" : il manquerait pas un "c" ?

et après, je ne pige pas ton "trace("---"+this );"

qu'attends-tu dans this ?


hth
--
-----
Ned
------------------------------------
Bien faire et laisser braire ...
mais après avoir lu & compris ceci :
http://faqmm.free.fr
------------------------------------