|
From: | Vincent Belaïche |
Subject: | RE: using ses programatically (was: a ses question) |
Date: | Sun, 24 Dec 2023 11:51:30 +0000 |
Hello Andrès,
That is a good point that ses+ needs better documentation : I attached an update of ses.texi,
![]() ![]()
Do you think it is OK ?
Concerning the ses-setq and change of ses-range, I realized that this makes a regression on ses-insert-range and ses-select, I have made a fix to ses-insert-range here :
![]()
Vincent.
De : andrés ramírez <rrandresf@hotmail.com>
Envoyé : lundi 20 novembre 2023 01:33 À : Vincent Belaïche <vincent.b.1@hotmail.fr> Cc : emacs-devel <emacs-devel@gnu.org>; boruch_baum@gmx.com <boruch_baum@gmx.com> Objet : Re: using ses programatically (was: a ses question) Hi. Vincent.
I am going to reply both of your emails from this one. >>>>> "Vincent" == Vincent Belaïche <vincent.b.1@hotmail.fr> writes: Vincent> Just to make my point more clear, Vincent> with Calc you need to write '(float 12 -1) for 1.2, and use calcFunc-add instead of +, Vincent> ie (apply 'calcFunc-add (ses-range N3 N6)). Also the cell printer should be Vincent> math-format-value. It sounds interesting to try. Vincent> Note that with IEEE754 numbers ses+ is not so useful if you are using ses-range as you Vincent> can delete blank by adding a ! argument, ie (apply 'ses+ (ses-range N3 N6)) is almost Vincent> the same as (apply '+ (ses-range N3 N6 !)), the sole difference is that the former does Vincent> the summing in revert order. Well explained Vincent. Thanks for the explanation. I do not use ses daily. So I discover ses (three years ago). And at that time workbook.ses was created. From that time to now workbook.ses has been my only contact with ses (with the exception of yesterday). Just changing values, not formulae, formulaes has been almost the same from three years ago. But Now that You have mentioned it. Three years ago I though why using '+ when 'ses+ always take care of blanks. So that's the one to use when using ses. Just until now You have showed me there is a difference. So now the question could be "why using 'ses+ when '+ is enough even for eliminating the blank values?" It ended like this: --8<---------------cut here---------------start------------->8--- (ses-setq :: sf N7 (apply '+ (ses-range N3 N6 !))) --8<---------------cut here---------------end--------------->8--- Vincent> emacs-devel <emacs-devel@gnu.org>; boruch_baum@gmx.com <boruch_baum@gmx.com> Objet : Vincent> RE: using ses programatically (was: a ses question) [...] Vincent> Have you tried to use in both case '+ or 'ses+, but not '+ in one case and 'ses+ in the Vincent> other case. Well. Actually I started with the simple case just using '+ and after it I replaced with the real formulae(which contained 'ses+) as the other ones within workbook.ses. I am happy I had try it that way. So I have learn the difference between 'ses+ and '+. It was a happy coincidence. BTW. s/"Compute the sum of the arguments, ignoring blanks."/"Compute the sum of the arguments in reverse order, ignoring blanks." Could above be ok (for improving the documentation of 'ses+)? Best Regards Andrés Ramírez |
[Prev in Thread] | Current Thread | [Next in Thread] |