Code: Select all
local aDatos:={1,2,3}
if (x in aDatos)
? "esta"
endif
Code: Select all
local aDatos:={1,2,3}
if (x in aDatos)
? "esta"
endif
Code: Select all
local x := "a"
local aDatos := "abc"
if (x $ aDatos)
? "esta"
endif
Code: Select all
local x := 1
local aDatos := {1,2,3}
if (Ascan(aDatos, x)>0)
? "esta"
endif
Code: Select all
x IN aDatos
Code: Select all
(Ascan(aDatos, x)>0)
If he is using Harbour, he should get a compilation error but not runtime error.I think Gustavo is using Harbour , the operator IN only exists in XHarbour
Code: Select all
#include "fivewin.ch"
#include "hbcompat.ch"
function Main()
local x := 2
local aList := { 1,2,3 }
if ( x IN aList )
? "ok"
else
? "not ok"
endif
return nil
Code: Select all
#translate ( <exp1> IN <exp2> ) => ( ( <exp1> ) $ ( <exp2> ) )
Code: Select all
if ( x IN aList )
Code: Select all
if ( x $ aList )