comp.lang.ada
 help / color / mirror / Atom feed
From: Gordon Dodrill <dodrill@swcp.com>
Subject: Are there any "bad" Ada constructs?
Date: 1996/09/04
Date: 1996-09-04T00:00:00+00:00	[thread overview]
Message-ID: <322E16DC.74B1@swcp.com> (raw)


The C and C++ language have several constructs that are undefined enough
that two conforming compilers are permitted to give different results and
still be correct.  One example is,

   i = 2;
   a[i] = i++;

Executing the second of these two statements, assuming they are properly 
declared first, a compiler is permitted to assign the value of 2 to either
a[2] or a[3] and be correct.  This construct is stated to be undefined by
the ANSI-C standard, and any compiler can actually do anything it pleases.
I saw one reference that stated there are 150 of these sorts of things in
C and C++.

My question is: Are there any constructs in Ada that are permitted to do
    two or more different things and still be correct, in a manner that
    is similar to that listed above?

Thanks,

Gordon

//       Coronado Enterprises Tutorials - Ada, C, C++, Pascal
//              Learn to program in a modern language
//         All are available at http://www.swcp.com/~dodrill
//                 Gordon Dodrill - dodrill@swcp.com





             reply	other threads:[~1996-09-04  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-04  0:00 Gordon Dodrill [this message]
1996-09-05  0:00 ` Are there any "bad" Ada constructs? Dennison
1996-09-05  0:00 ` Peter Amey
1996-09-16  0:00   ` George Haddad
1996-09-05  0:00 ` Jerome Desquilbet
replies disabled

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