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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,975b46ec27c036e5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-02 04:04:46 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.39.3.168!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Need help for a Calculator program Date: Sat, 2 Feb 2002 12:04:45 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1012651485 12257 129.241.83.78 (2 Feb 2002 12:04:45 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Sat, 2 Feb 2002 12:04:45 +0000 (UTC) User-Agent: slrn/0.9.7.3 (Linux) Xref: archiver1.google.com comp.lang.ada:19522 Date: 2002-02-02T12:04:45+00:00 List-Id: On Fri, 1 Feb 2002 23:46:07 +0000 (UTC), Jim wrote: > ok, i think im gonna start this program again and try not to follow the book > as im not understang the 'calculator' well enough. > > can someone give me some steps in designing a calculator, do i need to use > loops, do i need to use arrays etc that kind of thing. I don't know how this program works, but if I wanted to make a calculator I would like to have one that reads what I write until I press the key like: 2 + 3 * ( 6 / 7) - log(5) To get this I would read what the user types by a Get_Line statement. Get_Line will wait until you hit return. Now you use Get on this string to find all the operands etc. You can thus keep the old code (you can just add . to the string the user typed). Preben