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] Some random comments arising from my work

On 4/27/06, Dan Bricklin <danb@bricklin.com> wrote:
> Values can have any one of a few different types. Right now I have
> numeric, text, error, and blank. Each can have any number of
> sub-types. For example, numeric has plain numeric, date, time,
> date/time, currency, and percent. Text has plain, HTML, wiki (maybe
> more than one flavor), and maybe URL, image URL, and who knows what
> else (blob for random bytes? SVG? Postscript?).

Similar for KSpread, although we don't have subtypes, but we have two
types for each value - how is it stored, and what it is. The first one
- how it is stored - has few types - string, integer, double, boolean,
array, and that's about it. What it is, basically does what your
subtypes do - for example, numeric storage can in fact be percentage,
date, time, number, or somesuch.

> When I do an operation I have a table that tells the program given
> various value types what type of result to produce. For example,
> adding a number to a time gives you a time, but adding a date gives
> you a date/time. Having some standard for what you'd put in such a
> table would be nice... (But who has time to define it for the spec?)

Same. Although it's not really a table but more like, setting it to
the type of first operand, unless one of exceptions applies.
Having such a standard would be nice, but it is a problematic area -
as you know if you have read the past threads where me and Eike were
arguing about automatic type conversions :)

> When the user enters a value into a cell the value is parsed simply.


> Output formatting has explicit formats on the cells.

Same. Formatting is totally separated from the storage, hence, each
value has type setting, which tell us, what it is, and then it has
formatting, which can either be explicitly set, or it can be Default -
then we format according to what the cell actually holds. For example,
if you put a date into a cell, it gets stored as a numeric value, with
"what it is" set to Date. Formatting is "Default" by default, meaning
that the user sees the value as a date. Should he decide to change
formatting to something else, percentage for example, he'll get
something weird like 3600000%, because his wish about percentage
format will override the fact that the cell has a date value.
The user's wish about formatting can get ignored if it cannot be
applied - currently, this hapens if the cell holds a text value -
can't format a random text in date/time or percentage or any other

> Most of the formats are the normal ones: the equivalent of #,##0.00,
> etc. It is easy to change the set you choose from (at the app level)
> to handle different styles (e.g., currency indication, separator style, etc.).


> There are text formats for plain text (with chars like < and &
> escaped and line breaks preserved), HTML (sent to the browser without
> escapes), wiki (plain text plus markup like many wikis), and perhaps others.

We don't have any of this. At least not yet. Only plain text, and
something called QML which is supposed to hold markup, but it seems to
not be used.

> The General format comes in two flavors: general and general with
> separator. The general format looks to the value sub-type for
> formatting hints. Percent is treated as percent, date as one of the
> date formats, HTML text as HTML, etc.

Same. Not sure about general with separator, we don't have anything like that.

/ Tomas

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