However, if I uncomment the "a" line and comment out the "b" line (see
code above), then I get the error message:
c0a.adb:45:04: error: instantiation error at line 27
c0a.adb:45:04: error: "cfe2" is not visible
c0a.adb:45:04: error: instantiation error at line 27
c0a.adb:45:04: error: non-visible declaration at line 10
Have you the same experience?
reinert <rei...@gmail.com> writes:
(4 times!!!!)
I have to say these conditional constructs strike me as regrettable Perl-isms, and reduce clarity:
return foo when blah;
raise baz when quux;
On 2022-09-11 10:10, Simon Wright wrote:
I have to say these conditional constructs strike me as regrettable
Perl-isms, and reduce clarity:
return foo when blah;
raise baz when quux;
I presume you never use
exit Name when Condition;
since it must reduce clarity as well.
I suggested these constructs for Ada 9X. They were rejected because you
could get the same functionality with an if statement, and the ARG had
more important things to spend their time on. I guess the ARG's workload
must have decreased.
reinert <rei...@gmail.com> writes:
[...]I have to say these conditional constructs strike me as regrettable Perl-isms, and reduce clarity:
return foo when blah;
raise baz when quux;
On 2022-09-11 10:10, Simon Wright wrote:
I have to say these conditional constructs strike me as regrettable
Perl-isms, and reduce clarity:
return foo when blah;
raise baz when quux;
I presume you never use
exit Name when Condition;
since it must reduce clarity as well.
I suggested these constructs for Ada 9X. They were rejected because you
could get the same functionality with an if statement, and the ARG had
more important things to spend their time on. I guess the ARG's workload
must have decreased.
I don't find these "raise .. when" or "return .. when" constructs in the Ada 2022 RM draft, so I don't think the ARG has adopted them (yet). I suspect they
are GNAT extensions, as is the ability to make a subtype of String with a fixed
lower index bound of 1 but an unconstrained upper bound (1 .. <>), as also done
in the OP's code.
I would not use these non-standard GNAT extensions, as long as GNAT is not the
only Ada compiler in the world, which it fortunately isn't.
Could the result of
if function1 and function2 then ....
depend on the order of evaluation ( in some rare situations when f.eks. function2 affects the outcome from function1)?
I don't find these "raise .. when" or "return .. when" constructs in
the Ada 2022 RM draft, so I don't think the ARG has adopted them
(yet). I suspect they are GNAT extensions, as is the ability to make a subtype of String with a fixed lower index bound of 1 but an
unconstrained upper bound (1 .. <>), as also done in the OP's code.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:04:50 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,057 |