[Kst] if then else in equations?

Barth Netterfield netterfield at astro.utoronto.ca
Thu Sep 20 15:35:23 UTC 2012


We don't have if/else/elseif and I don't currently have plans for it -
mostly since I've never come up with a situation in equations where you
couldn't do it with the comparison operators.

You can submit a wishlist, of course :-)

As to how hard it would be to add it?  Well - George replaced my
hand-rolled parser years and years ago with a yacc parser, so I would have
to learn yacc/bison whatever, and then see how hard it would be to add it.

cbn


On Thu, Sep 20, 2012 at 11:11 AM, Brisset, Nicolas <
Nicolas.Brisset at eurocopter.com> wrote:

>  Hi Barth,
>
>
>
> OK, you’re right. That would do it.
>
> Now, don’t misunderstand my previous message: this was just an example JThere are many cases and they can probably not always be handled like that.
> Plus, it’s not very “discoverable”. And doesn’t handle if / elseif / else
> constructs…
>
> So, do we have if / then / else (or even better if / elseif / else /), or
> plans to add that in any non-geeky way?
>
>
>
> Nicolas
>
>
>
> *Von:* kst-bounces at kde.org [mailto:kst-bounces at kde.org] *Im Auftrag von *Barth
> Netterfield
> *Gesendet:* Donnerstag, 20. September 2012 16:57
> *An:* kst at kde.org
> *Betreff:* Re: [Kst] if then else in equations?
>
>
>
> ([V1]>180)*([(V1)]-360) + ([V1]<=180)*[(V1)]
>
>  On Thu, Sep 20, 2012 at 10:45 AM, Brisset, Nicolas <
> Nicolas.Brisset at eurocopter.com> wrote:
>
> Hi,
>
>
>
> one stupid little question: is there a possibility to use an if / then /
> else construct in equations?
>
> I’d like to do something like if ([Vector1 (V1)] > 180) then [Vector1
> (V1)]-360 else [Vector1 (V1)]
>
>
>
> Thanks for any hints. If there’s no way to do that, we should consider
> adding it to the parser. No idea how difficult that would be though.
>
>
>
> Nicolas
>
>
>    *EUROCOPTER DEUTSCHLAND GmbH*  *
> Sitz der Gesellschaft / Registered Office: Donauwörth*  *
> Registergericht / Registration Court: Amtsgericht Augsburg HRB 16508*  *
> Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board: Dr. Lutz Bertling
> *  *Geschäftsführung / Board of Management:*  *Dr. Wolfgang Schoder, Vorsitzender / CEO; Friedrich-Wilhelm Hormel; Ralf
> Barnscheidt*          CONFIDENTIALITY NOTICE
> This communication and the information it contains is intended for the addressee ( s ) named above and for no other persons or organizations.
> It is confidential and may be legally privileged and protected by law. The unauthorized use, copying or disclosure of this communication
> or any part of it is prohibited and may be unlawful.
> If you have received this communication in error, kindly notify us by return e-mail and discard and/or delete the communication.
> Thank you very much.
> It is possible for e-mails to be intercepted or affected by viruses. Whilst we maintain virus checks on our e-mails, we accept no liability for viruses
> or other material which might be introduced with this message.
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>
>


-- 
C. Barth Netterfield
University of Toronto
416-845-0946
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kst/attachments/20120920/7dd143db/attachment.html>


More information about the Kst mailing list