Andre Fischer wrote:
If the spec said that 2 is the only valid return value then we would have to return 2.
But then, since we also read XLSX and the OOXML standard prescribes that 0 ^ 0 should return an error, returning an error would be the common ground here: of course we don't want to depend on the file format, so choosing something where the standards agree makes sense. (As Dennis noted, Excel returns an error indeed, but a different one than what the OOXML specification prescribes... so this seems a difficult question there too!).
We should change the ODF spec first instead. A spec that basically says "whatever you want to return is fine" is of no value, as was proven in this thread.
A specification may need to leave room for implementation-defined behavior. Look at the C or C++ standard for example. ODF is indeed not too strong (I didn't check all details, but I think it might be possible to have Calc evaluate ="two"+"two" as "five" -or "four" for that matter- and not break the ODF specification), but this doesn't necessarily mean that the standard is flawed, only that it admits implementations that differ on this detail.
Regards, Andrea.