[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [analitza/aucahuasi/matrixctrs] analitza: When calculated a builtmethod, if it returns an expres
From:       Aleix Pol <aleixpol () kde ! org>
Date:       2014-05-01 1:45:34
Message-ID: CACcA1RpiOOs-TNgq3FVz7pGVA8wJ_-SxWTDYdM5prPs5sWu76A () mail ! gmail ! com
[Download RAW message or body]

On Thu, May 1, 2014 at 2:13 AM, Percy Camilo Triveño Aucahuasi <
percy.camilo.ta@gmail.com> wrote:

> Git commit 2fb3337e698cabef89ea2735f7aa2a302a914cfe by Percy Camilo
> Triveño Aucahuasi.
> Committed on 30/04/2014 at 04:25.
> Pushed by aucahuasi into branch 'aucahuasi/matrixctrs'.
>
> When calculated a builtmethod, if it returns an expression with errors,
> then the user doesn't have to print anything. Since we have an error state
> in Analyzer, then (to have uniform behaviour) we will print an empty string
> instead of 0. This way, if we have an error and the user prints the
> calculated result (by a bad use of API) then we will show an empty string
> instead of 0 (0 can't be understood as a computation, basically we tend to
> avoid misunderstandings in the use of API)
>
> M  +1    -1    analitza/analyzer.cpp
>
> http://commits.kde.org/analitza/2fb3337e698cabef89ea2735f7aa2a302a914cfe
>
> diff --git a/analitza/analyzer.cpp b/analitza/analyzer.cpp
> index f07e7d7..3646d3b 100644
> --- a/analitza/analyzer.cpp
> +++ b/analitza/analyzer.cpp
> @@ -1046,7 +1046,7 @@ Object* Analyzer::calcCallFunction(Container*
> function, const QVector<Object*>&
>                         exp.setTree(0);
>                 } else {
>                         m_err += exp.error();
> -                       ret = new Cn;
> +                       ret = new Container(Container::math);
>                 }
>         }
>  #ifdef SCRIPT_PROFILER
>
>
A hint about git commit messages:
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

It will make a much better history for the future.

TL;DR: make sure you have a 1 short line first and then the explaination
below, properly sized.

Cheers!
Aleix

[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 1, 2014 \
at 2:13 AM, Percy Camilo Triveño Aucahuasi <span dir="ltr">&lt;<a \
href="mailto:percy.camilo.ta@gmail.com" \
target="_blank">percy.camilo.ta@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Git \
commit 2fb3337e698cabef89ea2735f7aa2a302a914cfe by Percy Camilo Triveño \
Aucahuasi.<br>


Committed on 30/04/2014 at 04:25.<br>
Pushed by aucahuasi into branch &#39;aucahuasi/matrixctrs&#39;.<br>
<br>
When calculated a builtmethod, if it returns an expression with errors, then the user \
doesn&#39;t have to print anything. Since we have an error state in Analyzer, then \
(to have uniform behaviour) we will print an empty string instead of 0. This way, if \
we have an error and the user prints the calculated result (by a bad use of API) then \
we will show an empty string instead of 0 (0 can&#39;t be understood as a \
computation, basically we tend to avoid misunderstandings in the use of API)<br>


<br>
M   +1      -1      analitza/analyzer.cpp<br>
<br>
<a href="http://commits.kde.org/analitza/2fb3337e698cabef89ea2735f7aa2a302a914cfe" \
target="_blank">http://commits.kde.org/analitza/2fb3337e698cabef89ea2735f7aa2a302a914cfe</a><br>
 <br>
diff --git a/analitza/analyzer.cpp b/analitza/analyzer.cpp<br>
index f07e7d7..3646d3b 100644<br>
--- a/analitza/analyzer.cpp<br>
+++ b/analitza/analyzer.cpp<br>
@@ -1046,7 +1046,7 @@ Object* Analyzer::calcCallFunction(Container* function, const \
QVector&lt;Object*&gt;&amp;<br>  exp.setTree(0);<br>
                        } else {<br>
                                    m_err += exp.error();<br>
-                                  ret = new Cn;<br>
+                                  ret = new Container(Container::math);<br>
                        }<br>
            }<br>
  #ifdef SCRIPT_PROFILER<br>
<br>
</blockquote></div><br></div><div class="gmail_extra">A hint about git commit \
messages:  <a href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.ht \
ml">http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html</a></div>

<div class="gmail_extra"><br></div><div class="gmail_extra">It will make a much \
better history for the future.</div><div class="gmail_extra"><br></div><div \
class="gmail_extra">TL;DR: make sure you have a 1 short line first and then the \
explaination below, properly sized.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Cheers!</div><div \
class="gmail_extra">Aleix</div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic