Re: tdf124710, unexpected result for function IFS when argument NA() is followed by an argument that needs interpreting

2019-04-17 Thread Winfried Donkers
The actual root cause here is that IFS() and SWITCH() are not compiled into jumps so only the needed result would be calculated, but instead all arguments are calculated beforehand as in usual function calls. We had that discussion some while ago (and there exists some bug about it), but I didn'

Re: tdf124710, unexpected result for function IFS when argument NA() is followed by an argument that needs interpreting

2019-04-17 Thread Eike Rathke
Hi Winfried, On Wednesday, 2019-04-17 11:54:13 +, Winfried Donkers wrote: > Upon debugging IFS( 0, NA(), 1+0, "output" ) I came to the following > preliminary conclusions: > Before ScInterpreter::ScIfs_MS() is called, ScInterpreter::Interpret is > called for argument '1+0' . > That leads to

tdf124710, unexpected result for function IFS when argument NA() is followed by an argument that needs interpreting

2019-04-17 Thread Winfried Donkers
Hi Eike, Upon debugging IFS( 0, NA(), 1+0, "output" ) I came to the following preliminary conclusions: Before ScInterpreter::ScIfs_MS() is called, ScInterpreter::Interpret is called for argument '1+0' . That leads to a call to scInterpreter::CalculateAddSub( false ) and there the problem starts