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=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,5f764f1f7822ab9c X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: Top 10 Language Constructs (Ada) Date: 2000/07/25 Message-ID: #1/1 X-Deja-AN: 650793252 Sender: kst@king.cts.com References: <8kmjja$l5h$1@pollux.ip-plus.net> <3970F56F.F3A70FAD@icdc.com> <01HW.B59982450058903A078EC70C@news.pacbell.net> <39751555.4E40A4A7@lmco.com> <8l21od$mkr@newsserv.vs.dasa.de> X-Trace: thoth.cts.com 964576110 28084 205.163.0.22 (26 Jul 2000 01:48:30 GMT) Organization: CTSnet Internet Services Newsgroups: comp.lang.ada X-Complaints-To: abuse@cts.com Date: 2000-07-25T00:00:00+00:00 List-Id: Keith Thompson writes: > "Dr. Joachim Schr�er" writes: > [...] > > type Plasma_Volts_Type is delta 2.0**(-13) range -4.0 .. 4.0 - 2.0**(-13); > > for Plasma_Volts_Type'Size use 16; > > > > And if the required range and the 'delta allow 'delta < 'small you have to > > write a rep-clause for 'small like: > > > > for Plasma_Volts_Type'Small use 2.0**(-13); > > Or better yet: > > for Plasma_Volts_Type'Small use Plasma_Volts_Type'Delta; Or if that doesn't work (due to freezing rules, as others have pointed out): Plasma_Volts_Small : constant := 2.0**(-13); type Plasma_Volts_Type is delta Plasma_Volts_Small range -4.0 .. 4.0 - Plasma_Volts_Small; for Plasma_Volts_Type'Size use 16; for Plasma_Volts_Type'Small use Plasma_Volts_Small; (This compiles under GNAT 3.12p.) -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Welcome to the last year of the 20th century.