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,e99ea9c9d228f6b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-21 15:56:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Andrew Newsgroups: comp.lang.ada Subject: Re: interest computing problem Date: Sun, 21 Sep 2003 17:55:49 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <3F6A80FA.3ECF8B55@notes.udayton.edu> In-Reply-To: <3F6A80FA.3ECF8B55@notes.udayton.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:42728 Date: 2003-09-21T17:55:49-05:00 List-Id: Leon Winslow wrote: > Andrew > > Your program is a good example of a student homework program. It works, as > long as you remember all of the assumptions you made in writing it. This is > about as much as most instructors expect of their students and I'm sure you > got a good grade on it. > > It might be instructive, however, to rewrite it in a more robust version. > For example, define some data types and check the input for valid values. > Thus, real money is always integers (minimum value is one cent, not .00001 or > some such) and interest is either an integer type 3% or a float type .12% > depending on what you want. Note this will require you to define exactly how > one computes interest times dollars. All of these details are one reason > real programs tend to look long and complicated to outsiders. > > If you can do a robust version of this problem, you will have accomplished > something past what your instructor expected. > > Its always good to see another new Ada programmer. Good luck in your > endeavors. > > Lee Winslow > > Andrew wrote: > > >>ok I've run into a snag .. and i'm hoping that a programmer can help me >>out. >> >>here is a copy of my program (written in Ada) >><<>><<>> >>============ >> >>but I'm hoping that this is just a simple case of I .. well *L* I'm >>hoping this is a simple error that I'm overlooking.. >> >>sub-note : this program is directly copied from a printout of a program >>that I wrote in college (and it worked on the colleges computers). >> >>By the way I'm writing this on a Red Hat Linux 9.0 computer (I don't >>think that would matter but ..) > > That is definitely something that I need to look into.. making this program as you said a little more robust. and thank you for the good luck. Andrew