From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e86b97ab50813172 X-Google-Attributes: gid103376,public From: gmckee@cloudnine.com (Gary McKee) Subject: Re: Looking for calc. package in Ada Date: 1996/06/27 Message-ID: #1/1 X-Deja-AN: 162434804 references: <4qp7vu$c9f$1@mhafn.production.compuserve.com> organization: McKee Consulting (Software Assessment) newsgroups: comp.lang.ada Date: 1996-06-27T00:00:00+00:00 List-Id: In article <4qp7vu$c9f$1@mhafn.production.compuserve.com>, Strategies SA <100747.2001@CompuServe.COM> wrote: > Hello > I'm looking for a package looking like : > > package CALCULATOR is > ... > procedure STORE_VARIABLE is (NAME : STRING; > VALUE : FLOAT); > > function CALCULATE (EXPRESSION : STRING) > return FLOAT; > ... > end CALCULATOR; > > In order to use it the following way > ... > CALCULATOR.STORE_VARIABLE ("A", 10.0); > ... > RESULT := CALCULATOR.EVALUATE ("10*COS(A)"); > ... > Does anybody know where I can find (good) inspiration ? > Thank You in advance > > Jerome HAGUET > Strategies > France --------------------------------------------------------------- I don't have an Ada package to do this. However, There is a simple dseign (in C++) if you decide to implement it yourself. "The C++ Programming Language" by Bjarne Stroustrup (2nd edition) has a simple interactive calculator in Chapter three that could be a basis for your Ada package.