- Code: Select all Expand view RUN
local aDatos:={1,2,3}
if (x in aDatos)
? "esta"
endif
eso al ejecutarlo me da un error de argumento, que hago mal?
local aDatos:={1,2,3}
if (x in aDatos)
? "esta"
endif
local x := "a"
local aDatos := "abc"
if (x $ aDatos)
? "esta"
endif
local x := 1
local aDatos := {1,2,3}
if (Ascan(aDatos, x)>0)
? "esta"
endif
x IN aDatos
(Ascan(aDatos, x)>0)
I think Gustavo is using Harbour , the operator IN only exists in XHarbour
#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
#translate ( <exp1> IN <exp2> ) => ( ( <exp1> ) $ ( <exp2> ) )
if ( x IN aList )
if ( x $ aList )
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 69 guests