[Harbour-users] Re: Warning about IIF statement question

Angel Pais amigosam at adinet.com.uy
Wed Feb 3 21:06:59 EST 2010


El 03/02/2010 21:44, smu johnson escribió:
> Hi, is there anyway to avoid the warning when I use an IFF without bothering
> to pass it an ELSE statement?  This is probably not a problem or anything,
> but just curious.
>
> Thanks
>
> Warning -->  hello.PRG(4) Warning W0027  Meaningless use of expression
> 'Logical'
>
> ---- code ---
>
> FUNC MAIN()
>
>    LOCAL xSDate
>    Eval({|| iif(Empty(xSDate),xSDate:=date(),.t.),.t.})
>
>    ? xSDate
>
> RETURN
>

Maybe creating a dummy function that returns true ?
eg:
function GimmeTrue()
return .T.

Eval({|| iif(Empty(xSDate),xSDate:=date(),GimmeTrue()),GimmeTrue()})



More information about the Harbour-users mailing list