@Eval broken

Anyone experienced this?

Try evaluating the following formula.

{@If( 1 = 1 ; @Return(“A”) ; @Return(“B”))}

Works great in Evaluate() in LotusScript.

Fails in @Eval in formula language.

However,

{@If( 1 = 1 ; “A” ; “B”)}

does work as expected in both @Eval and Evaluate().

I can do this if i have to. Just a pain because I want some easy early exits when using @Eval().

Just seems that @Return() is not handled well by @Eval!

Subject: @Eval broken

Perhaps it is working as intended. I have not tried it but Designer Help

http://www-12.lotus.com/ldd/doc/domino_notes/7.0/help7_designer.nsf/855dc7fcfd5fec9a85256b870069c0ab/28b454131caee8178525704a003fe2d4?OpenDocument

indicates that the Return value

lastExpression

  The value of the last expression.

So it may need to evaluate the entire set of expressions.

Subject: RE: @Eval broken

hey Cesar,

Could be. But I find that a tad odd. I would expect @Eval() and Evaluate() to behave consistently. Normally the last statement is always what is returned. Unless of course you use @Return earlier.

I would just like them to behave the same!

Thanks for your thoughts. They do show consistency with the documentation!

Subject: RE: @Eval broken

Apparently, @Return breaks you out of a formula, whatever formula you are in, all the way back out to where you’re not executing a formula anymore.