From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: type definition for an integer with discrete range
Date: Mon, 1 Apr 2019 09:41:34 -0700 (PDT)
Date: 2019-04-01T09:41:34-07:00 [thread overview]
Message-ID: <51c79236-9828-4a84-b41d-6fc5a9e69579@googlegroups.com> (raw)
In-Reply-To: <ly1s2lhery.fsf@pushface.org>
Am Montag, 1. April 2019 18:27:32 UTC+2 schrieb Simon Wright:
> AdaMagica <christ-usch.grein@t-online.de> writes:
>
> > Am Montag, 1. April 2019 08:59:56 UTC+2 schrieb mario.b...@gmail.com:
> >> Thanks, it is nearly perfect now :-)
> >> The line 24 in the file
> >> https://github.com/Blunk-electronic/ada_training/blob/master/src/type_angle/type_angle.adb
> >> Should produce an error at compile time. Apart from this "nice to
> >> have" the program does what I want.
> >
> > You have to make sure that "pragma Assertion_Policy (Check);" is set.
>
> Yes, that's why it appears at the top of the program.
Oh, I missed this.
> Alternatively you could compile with -gnata.
>
> If I have the Assertion_Policy pragma in spec A, and package B uses that
> spec, are the assertions specified in A applied in B? (I suspect not)
You're right with your suspicion. That's why this pragma is a "configuration pragma"; it should be in a special file (compiler dependent), then it applies to all units to which this config file applies.
Or, for GNAT only, you use -gnata, as you said above.
next prev parent reply other threads:[~2019-04-01 16:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 16:10 type definition for an integer with discrete range mario.blunk.gplus
2019-03-29 16:34 ` tranngocduong
2019-03-29 16:46 ` mario.blunk.gplus
2019-03-30 4:17 ` tranngocduong
2019-03-30 4:19 ` tranngocduong
2019-03-29 20:24 ` Simon Wright
2019-03-29 20:51 ` mario.blunk.gplus
2019-03-29 21:24 ` Simon Wright
2019-03-30 20:44 ` mario.blunk.gplus
2019-03-30 22:13 ` Jere
2019-04-01 6:59 ` mario.blunk.gplus
2019-04-01 15:52 ` AdaMagica
2019-04-01 16:27 ` Simon Wright
2019-04-01 16:41 ` AdaMagica [this message]
2019-03-29 21:57 ` Dmitry A. Kazakov
2019-03-30 21:45 ` John Perry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox