>>I have always used the if .. endif clause but am wondering if the IIF could serve me here. The example in help menu of VFP does not answer my question.
>>here is what I want to do using if ... endif
>>
>>
>>if myval<7
>>replace myval with int(myval)
>>else
>>? 'myval exceeds 7'
>>endif
>>
>>
>>I tried this without success - is it possible ?? (or does this function only apply to expressions) or do I just have the syntax wrong.
>>
>>? IIF(myval<7,Replace myval with Int(myval), 'Retained myval' )
>>
>
>IIF() is function, REPLACE is command. You cannot have command inside inline function.
>
>
>MartinaJ
thanks martina - that would explain why I couldn't get it going with the traditional syntax.