OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-formula] Considering IFERROR function


Eike Rathke:
> As already pointed out on the comment list, for some occasions an
> IFERROR(expression;errorcase) does come handy. The function evaluates
> 'expression' as usual, and if that results in an error returns the
> result of an 'errorcase' expression, otherwise the result of
> 'expression'. Also ECMA/MOOXML defines this function.
> 
> I propose to include IFERROR in our ODFF specification.

Great!  That would be another way to handle the problem I noted earlier (namely, how to prevent writing a complicated expression twice just to override one value).  I had originally proposed an "IFEQ" function, which is more general than IFERROR, but it special-cases Error values and isn't implemented anywhere currently.

One problem with IFERROR is that it masks WHICH error occurs - you may only want the substitution with one Error value (e.g., NA()).  One advantage of IFERROR is that it's simple and straightforward, and that is a VERY GOOD thing.  It being implemented somewhere is a good thing too.

Andreas J Guelzow:
>On first glance this looks equivalent to
>IF(ISERROR(expression);errorcase;expression)
>but of course this "equivalent" version evaluates 'expression' twice
>which can give a different result.

Right.  Also, 'expression' may be complicated, so only having to say it once is a very good thing.

We could add IFERROR, IFEQ, both, or neither.  I think we should add at _least_ IFERROR. Comments?

--- David A. Wheeler


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]