From: "Jim" <genx54321@hotmail.com>
Subject: Re: Need help for a Calculator program
Date: Sat, 2 Feb 2002 16:22:15 +0000 (UTC)
Date: 2002-02-02T16:22:15+00:00 [thread overview]
Message-ID: <a3h3nk$4c2$1@knossos.btinternet.com> (raw)
In-Reply-To: mailman.1012623182.24002.comp.lang.ada@ada.eu.org
thats my problem i do not know how to design it, i am fairly new to ADA,
heck i am new to programming.
i did some pseudo code for the calculator program from the online book, just
to get my head round it :-
BEGIN
enter expression
get input
start main loop
start nested loop
get operator symbol
if there is a 'space' character end the loop
end nested loop
if 'full stop' character show answer of expression, exit main loop
else
get number
if + -> result := result + number
if - -> result := result - number
if * -> result := result * number
if / -> result := result / number
end main loop
end main program
do you think that is alright ?
are there any other ways of designing this calculator program ? maybe use
arrays ?
"Eric Merritt" <cyberlync@yahoo.com> wrote in message
news:mailman.1012623182.24002.comp.lang.ada@ada.eu.org...
> Overall design should be pretty similar regardless of
> implementation language. I would suggest you psuedo
> code it and once the design is work out in you mind
> attempt to implement it in Ada. That way you may
> concentrate on each aspect of you projects as it
> arrises without worring about the other aspects too
> much.
>
next prev parent reply other threads:[~2002-02-02 16:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-01 12:06 Need help for a Calculator program Jim
2002-02-01 12:41 ` John English
2002-02-01 14:07 ` Preben Randhol
2002-02-01 18:17 ` Stephen Leake
2002-02-01 18:57 ` Jim
2002-02-01 23:20 ` Jeffrey Carter
2002-02-01 23:46 ` Jim
2002-02-02 4:12 ` Eric Merritt
2002-02-02 16:22 ` Jim [this message]
2002-02-02 12:04 ` Preben Randhol
2002-02-03 15:41 ` Jim
2002-02-04 13:54 ` Stephen Leake
2002-02-12 11:55 ` John English
2002-02-12 15:43 ` Pat Rogers
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox