<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font size="+2">Hi Eike, all,</font></p>
<p><font size="+2">I have been concentrating on converting IFS
functions to their equivalent with nested IF functions, e.g.
IFS(b1;r1;b2;r2) to IF(b1;r1;IF(b2;r2;#NA)).<br>
</font></p>
<p><font size="+2">I now think I know where to insert ocIf tokens in
the IFS-function string when looking at
FormulaCompiler::Factor(), but I don't know how to insert a
FormulaTokenRef in the code and not destroy the stack, jump
array or other at the same time.</font></p>
<p><font size="+2">For some time thought that
FormulaTokenArray::RewriteMissing(...) might be a better and
easier place, but this function is only called after
ScInterpreter::Interpret(), so that has no use.</font></p>
<p><font size="+2"><br>
</font></p>
<p><font size="+2">Do you have any suggestions where and how I might
try to insert these extra ocIf, ocSep and #NA tokens (and
replace ocIfs with ocIf). <br>
</font></p>
<p><font size="+2">With ocSwitch I also must be able to copy (the
result of) the first argument on top of the stack before the
next ocIf is executed. The equivalent in those case would be
SWITCH(x;b1;r1;b2;r2) converted to IF(x=b1;r1;IF(x=b2;r2;#NA)).</font></p>
<p><font size="+2">Winfried<br>
</font></p>
</body>
</html>