comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: non record limited type
Date: Wed, 21 Feb 2018 07:58:16 -0800 (PST)
Date: 2018-02-21T07:58:16-08:00	[thread overview]
Message-ID: <3a2e91d4-f563-4843-9c80-5a76732626d3@googlegroups.com> (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


             reply	other threads:[~2018-02-21 15:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 15:58 Mehdi Saada [this message]
2018-02-21 21:42 ` non record limited type 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
replies disabled

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