[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:       Percy_Camilo_Triveño_Aucahuasi <percy.camilo.ta () gmail ! com>
Date:       2014-05-01 1:49:45
Message-ID: CAH5PjXpyzFJ=voJ-uPBEJKu98qNmBZWNZVgcfx5ynRTRPhhs+w () mail ! gmail ! com
[Download RAW message or body]

ty ;)


On Wed, Apr 30, 2014 at 8:45 PM, Aleix Pol <aleixpol@kde.org> wrote:

> 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">ty ;)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 30, 2014 \
at 8:45 PM, Aleix Pol <span dir="ltr">&lt;<a href="mailto:aleixpol@kde.org" \
target="_blank">aleixpol@kde.org</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div \
class="h5"><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></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.html" \
target="_blank">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><span class="HOEnZb"><font \
color="#888888"><div class="gmail_extra">Aleix</div></font></span></div> </blockquote></div><br></div>



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

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