>if myval<7 >replace myval with int(myval) && I want to remove values to the right of the decimal >else >? 'myval exceeds 7' >endif >>
>? IIF(myval<7,Replace myval with Int(myval), 'Retained myval' ) >IIF() returns either the second or third parameter as an expression, depending on the value of the first parameter. You're attempting to return a command rather than an expression.
REPLACE MyVal WITH IIF( MyVal < 7, INT( MyVal ), MyVal ) IN MyAliasbut that's not a great alternative. MyVal would always be REPLACEd, even with the same value, which will affect things like GETFLDSTATE( ).