List Info

Thread: KSpread logic operations




KSpread logic operations
user name
2006-04-26 04:25:48
Hi!
I like to use kspread to 'doodle' while I develop but
always wanted to be
able to do binary logic operations to calculate/decode
various lookup
values rather than writing little scripts/c apps.
As a result I added a handful of binary math functions to
kspread to help me
out and I wondered if anyone liked the idea - or had any
suggestions for
improvements or other additions.

Also... having never done any koffice coding before, any
comments or noting
mistakes welcome.

Cheers, 
Ivor
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
KSpread logic operations
user name
2006-04-26 07:24:29
Greetings !

On 4/26/06, Ivor Hewitt <ivorivor.org> wrote:
> Hi!
> I like to use kspread to 'doodle' while I develop but
always wanted to be
> able to do binary logic operations to calculate/decode
various lookup
> values rather than writing little scripts/c apps.
> As a result I added a handful of binary math functions
to kspread to help me
> out and I wondered if anyone liked the idea - or had
any suggestions for
> improvements or other additions.

Sounds good, although the docs could use improvement - not
quite
obvious that this is doing binary operations - logical
and/or are
different 

Also, I don't think that adding a new Programming function
category is
necessary for this - an existing group like Logical, or
maybe Math,
would work well enough.

Coding-wise, it looks fine, apart from the functions not
being
prepared to support higher precision and the like, when we
get to
adding that - using the ValueCalc class. For now, the code
in
ValueCalc would be the same to what you wrote into the
function
implementation, but once we get other stuff done, there are
plans to
improve ValueCalc to achieve transparent support for
arbitrary
precision, complex numbers and other things - hence, where
feasible,
these operations would be better off in the ValueCalc class,
with
function implementations calling those.

/ Tomas
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
KSpread logic operations
user name
2006-04-26 08:14:14
Tomas Mecir wrote:
> Sounds good, although the docs could use improvement -
not quite
> obvious that this is doing binary operations - logical
and/or are
> different 
> 
Um, yeah documentation has never been my strong point. 

> Also, I don't think that adding a new Programming
function category is
> necessary for this - an existing group like Logical, or
maybe Math,
> would work well enough.
>
Ok. I did that for two reasons, firstly I thought that since
these were 
operations likely to be of interest to a minority of people
keeping them 
out of the way was a good idea.... also I thought I might be
adding 
other funky "programming oriented" routines
which could go in there too.

I can certainly move them wherever is most appropriate. Not
sure about 
"Logic" though since that seems to be more
descriptive of boolean math.

> Coding-wise, it looks fine, apart from the functions
not being
> prepared to support higher precision and the like, when
we get to
> adding that - using the ValueCalc class. For now, the
code in
> ValueCalc would be the same to what you wrote into the
function
> implementation, but once we get other stuff done, there
are plans to
> improve ValueCalc to achieve transparent support for
arbitrary
> precision, complex numbers and other things - hence,
where feasible,
> these operations would be better off in the ValueCalc
class, with
> function implementations calling those.
> 
Great, thanks for the feedback.

BTW is there any way to enter numbers into a cell with a
specific base? 
A the moment I enter values as strings and then use the
HEX2DEC 
functions. Is there any way to prefix or suffix an entered
number to 
denote a base 2 or 16 value or is that rather "out of
scope" for a 
spreadsheet.

Cheers,

-- 
Ivor
http://www.ivor.it
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
KSpread logic operations
user name
2006-04-27 07:08:11
On 4/26/06, Ivor Hewitt <ivorivor.org> wrote:
> > Also, I don't think that adding a new Programming
function category is
> > necessary for this - an existing group like
Logical, or maybe Math,
> > would work well enough.
> >
> Ok. I did that for two reasons, firstly I thought that
since these were
> operations likely to be of interest to a minority of
people keeping them
> out of the way was a good idea.... also I thought I
might be adding
> other funky "programming oriented" routines
which could go in there too.

Well if you manage to come up with more such routines, then
sure, we
can create a separate category like that.

> I can certainly move them wherever is most appropriate.
Not sure about
> "Logic" though since that seems to be more
descriptive of boolean math.

Well your functions basically are just an extension of
boolean math,
it's just that they get applied multiple times, once per
each bit 
But I agree that they might create confusion for the user
who doesn't
understand the theory behind.

> BTW is there any way to enter numbers into a cell with
a specific base?
> A the moment I enter values as strings and then use the
HEX2DEC
> functions. Is there any way to prefix or suffix an
entered number to
> denote a base 2 or 16 value or is that rather
"out of scope" for a
> spreadsheet.

I think that would be considered "out of scope"
for now, although with
the plans to eventually support arbitrary precision, complex
numbers
and whatnot, this might be a worthwhile addition as well,
we'll see.
You may want to create a wishlist item over at bugs.kde.org.

/ Tomas
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )