comp.lang.ada
 help / color / mirror / Atom feed
* non record limited type
@ 2018-02-21 15:58 Mehdi Saada
  2018-02-21 21:42 ` Jere
  2018-02-22  1:29 ` Randy Brukardt
  0 siblings, 2 replies; 16+ messages in thread
From: Mehdi Saada @ 2018-02-21 15:58 UTC (permalink / raw)


I saw by trying it, that one could give a limited view, of a non-limited non-record type like
type FOO is limited private;
private
type FOO is new INTEGER;
, which I wasn't sure of just by reading the RM. That's a cool feature indeed, but why isn't it possible to write also
type FOO is limited range 1..5; ?
or    type FOO is limited array (INTEGER range <>) limited INTEGER;
I wasn't sure either from reading, but I can't compile anything similar. I don't understand why the possibility of forbidding copying isn't allowed for non record type.

Also, another question: if only the public view is limited, what about the parameter passing ? Is it by reference or copy, when such copy are made in the body ? I would guess by copy, but I prefer to ask


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-02-23  8:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 15:58 non record limited type Mehdi Saada
2018-02-21 21:42 ` Jere
2018-02-21 22:29   ` Mehdi Saada
2018-02-21 23:08     ` Jere
2018-02-21 23:14     ` Jere
2018-02-22  0:09       ` Mehdi Saada
2018-02-22  0:26         ` Mehdi Saada
2018-02-22  2:57           ` Jere
2018-02-22 16:45         ` Jeffrey R. Carter
2018-02-22 17:06           ` Dmitry A. Kazakov
2018-02-22  7:56       ` Simon Wright
2018-02-22  1:20     ` Randy Brukardt
2018-02-22  1:29 ` Randy Brukardt
2018-02-22  8:25   ` Dmitry A. Kazakov
2018-02-22 23:24     ` Randy Brukardt
2018-02-23  8:58       ` Dmitry A. Kazakov

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