comp.lang.ada
 help / color / mirror / Atom feed
From: Eric Jacoboni <jaco@neottia.net>
Subject: Re: Ada begginer's new problem.
Date: Thu, 28 Oct 2004 13:26:19 +0200
Date: 2004-10-28T13:26:19+02:00	[thread overview]
Message-ID: <m21xfj3wys.fsf@mac.scrogneugneu.org> (raw)
In-Reply-To: clqa5t$pif$1@netnews.hinet.net

"bubble" <bubble@bubble.d2g.com> writes:

> 1. ��continue�� reserve word support?
> Ada has no ��continue�� word.

Why Ada should have such a construct which breaks, imho,
logical flow of a program? (i suppose you talk about the C continue
statement).

> It's hard to read,

Perhaps because you could use another algorihm to achieve the same goal ?

> How should I do to remove "goto"  ....?

The question is rather: why i've had to use a goto in my algorithm ? ;-)

> 2. type declare problem
>
> I know there are some choices can apply to my program.
> ( a ). Type stock_price is new float;
> ( b ). Type stock_price is digits 5;
> ( c ). Subtype stock_price is float;
>
> I know if I use ( c ) style.  I can mix stock_price and float type to
> compute together.
>
> if we don't consider ( c ) style, only  consider (a) and (b).
> which style is best?

b is the best of your 3 options as it fits exactly to your requirement.
But, for modelizing prizes, i suggest you look at decimal fixed point, rather. 
-- 
�ric Jacoboni, n� il y a 1402406099 secondes



  parent reply	other threads:[~2004-10-28 11:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-28  8:11 Ada begginer's new problem bubble
2004-10-28  8:44 ` Jacob Sparre Andersen
2004-10-28 10:38 ` Larry Kilgallen
2004-10-28 11:26 ` Eric Jacoboni [this message]
2004-10-28 20:19 ` Nick Roberts
2004-10-29  2:58   ` bubble
2004-10-29  2:47 ` Steve
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox