comp.lang.ada
 help / color / mirror / Atom feed
From: jamesth@microsoft.UUCP (James THIELE)
Subject: Re: constraint error question for language lawyers
Date: 30 Nov 90 16:02:32 GMT	[thread overview]
Message-ID: <59445@microsoft.UUCP> (raw)
In-Reply-To: 9011091437.AA20896@ajpo.sei.cmu.edu

In article <9011091437.AA20896@ajpo.sei.cmu.edu> NCOHEN@IBM.COM ("Norman H. Cohen") writes:
| Alex Blakemore asks why, given the declarations
| 
|   type Short is range 0 .. 10;
|   type Data is array (Short range <>) of Character;
|   type Var_Text (Len : Short := 0) is
|     record
|       Text : Data (1 .. Len);
|     end record;
|   Dummy : Var_Text; -- unconstrained
| 
| the statements
| 
|   Dummy := (Len => 0, Text => "");
|   Dummy := (Len  => Dummy.Len + 1,
|             Text => Dummy.Text & 'a');
| 
| raise Constraint_Error in the second assignment.
| 
[62 lines of "legalese" deleted]

When I worked with Ada, it always seemed that the manual was like the
"Colossal Cave" -- you always had to go several places to get what you needed.

But my favorite comment always was:

	"Ada is PASCAL for lawyers."

James Thiele
microsoft!jamesth

  reply	other threads:[~1990-11-30 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-11-09 14:36 constraint error question for language lawyers "Norman H. Cohen"
1990-11-30 16:02 ` James THIELE [this message]
  -- strict thread matches above, loose matches on Subject: below --
1990-11-08 17:18 Alex Blakemore
1990-11-09 14:12 ` David Collard
1990-11-10  1:08 ` Charles H. Sampson
1990-11-17 10:12 ` Jean Pierre Rosen
replies disabled

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