[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office-formula] Our next adventure: Types and conversions
David A. Wheeler wrote:
I don't like leaving things so open, but I'm not sure I have a better
solution than C, I want to give it more thought.
I don't accept that it is only geeks who end up with =A1+3 (where
A1="3") and expect 6. I my organisation deal with a lot of spreadsheet
imported from text files spat out by customers' systems. These often
end up with conversion issues. Computers should just work! They
shouldn't put people through unnecessary pain or wearyingly steep
learning curves. Equally, they should ensure the user knows what is
going on to ensure they are getting the results they are seeking. This
is a difficult path to tread.It is important to always remember that we are talking about the file format not the UI. If we insist on type conversion in the file format that doesn't preclude implementations from doing implicit type conversions (A) or requiring explicit conversions; but they MUST save with explicit conversions. So file format has =VALUEL("3.5"; "GB")+3 and the UI can display to the user ="3.5"+3, because it does A. Another implementation may display =VALUE("3.5")+3, because it doesn't. But they must save back to =VALUEL("3.5"; "GB")+3. I don't think we should ignore locale (and I don't think locale can be sheet wide - A2). The spreadsheet should calculate correctly, or tell the user that it may not. This is why some argue for D - at least that is deterministic. Implementations can either support the VALUEL(v;locale) function or, when loading the sheet and finding VALUEL functions for a locale other than the machine locale, warn the user that the sheet contains conversions from other locales. It could offer the user the choice to convert the formulae to the machine locale with the caveat that the results may differ; or it could lock the VALUEL and precedent cells so that the user can only change those parts of the sheet it can deal with. These are implementation issues. Ultimately implementations would support VALUEL and allow a mix of locales in one sheet - so as the sheet is passed around the globe it always computes correctly. Some solution along these lines, IMO, brings great flexibility, is forward looking and doesn't ignore the problem. Or have I missed something? Can this be applied to the use of the logical type? I haven't thought that through yet. --- Richard Kernick |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]