comp.lang.ada
 help / color / mirror / Atom feed
From: Blady <p.p11@orange.fr>
Subject: Aspect location in expression function.
Date: Sat, 14 May 2022 13:47:28 +0200	[thread overview]
Message-ID: <t5o4sg$3oh$1@gioia.aioe.org> (raw)

Hello,

I'm puzzled when I want to changed a function body with aspects to an 
expression function, for instance:

function Length (S : Some_Tagged_Tyoe) return Natural
   with Pre => S.Valid
   is
   begin
   return S.Length;
   end;

have to be changed in:

function Length (S : Some_Tagged_Tyoe) return Natural
   is (S.Length)
   with Pre => S.Valid;

The location of the aspect has moved to the end.

I'd like simply replace the begin block by the expression, as:

function Length (S : Some_Tagged_Tyoe) return Natural
   with Pre => S.Valid
   is (S.Length);

What could be any reasons not to permit it?

Thanks, Pascal.

             reply	other threads:[~2022-05-14 11:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14 11:47 Blady [this message]
2022-05-14 15:40 ` Aspect location in expression function J-P. Rosen
2022-05-24  4:05   ` Randy Brukardt
2022-05-24 10:01     ` J-P. Rosen
2022-05-25  5:17       ` Randy Brukardt
2022-05-24 18:24     ` G.B.
2022-05-25  5:20       ` Randy Brukardt
2022-05-25 18:45         ` G.B.
replies disabled

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