comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: how to force the Small aspect of a new type derived from the generic formal type ?
Date: Wed, 24 Jan 2018 11:16:00 -0800 (PST)
Date: 2018-01-24T11:16:00-08:00	[thread overview]
Message-ID: <1aaa851e-495a-4dd4-8db7-0fd84ee8225f@googlegroups.com> (raw)

Yet again... Look at this ! The teacher said: use Small aspect/representation clause, and somewhere else he said to make the package generic. I did both...

generic
   type Modele is delta <> ;
package Proba is
   type T_proba is new MODELE range 0.1..1.0 with Small => Modele'Delta;

gives us: representation item not allowed for generic type

I don't get it, since the RM states:
formal_complete_type_declaration ::= 
    type defining_identifier[discriminant_part] is formal_type_definition
        [aspect_specification];

Doing it otherwise:   type Modele is delta <>  with SMALL => MODELE'DELTA;
gives a more precise warning: aspect "Small" not allowed for formal type declaration.

How do I do that ? Forcing the representation of a new type derived from the generic formal type ?

             reply	other threads:[~2018-01-24 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 19:16 Mehdi Saada [this message]
2018-01-25  3:30 ` how to force the Small aspect of a new type derived from the generic formal type ? Randy Brukardt
2018-01-25 12:54   ` Mehdi Saada
2018-01-26  4:38     ` Randy Brukardt
2018-01-26 11:13     ` Alejandro R. Mosteo
2018-01-25 18:35   ` G. B.
2018-01-26  4:42     ` Randy Brukardt
replies disabled

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