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-01 05:11:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!btnet-peer1!btnet-peer0!btnet-peer!btnet!newspeer.clara.net!news.clara.net!server3.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: Need help for a Calculator program Date: Fri, 01 Feb 2002 12:41:08 +0000 Organization: University of Brighton Message-ID: <3C5A8CE4.7CE559D@brighton.ac.uk> References: NNTP-Posting-Host: pcje.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1012567202 20084 193.62.183.48 (1 Feb 2002 12:40:02 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 1 Feb 2002 12:40:02 GMT X-Mailer: Mozilla 4.7 [en-gb] (WinNT; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:19464 Date: 2002-02-01T12:40:02+00:00 List-Id: Jim wrote: > > ive been reading that online book > http://www.it.bton.ac.uk/staff/je/adacraft/ > > it tell you how to program a calculator throughout the book, starting > with basic adding and then going on to operator procedence(well i > havent reached this stage yet) but the second part of the calculator > program (chapter ) you enter an expression eg 1 + 2 + 3 * 4. but you > have to end the expression with a full stop. Is there a way where you > dont have to enter a full stop. You can always use Ada.Text_IO.End_Of_Line to test for the end of the line, or read a line into a string using Ada.Text_IO.Get_Line and then process the string, stopping when you reach the end of it. The implementation details I leave as an exercise for the reader... :-) ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------