From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Ada can't initialize (aggregate) array of length 1?
Date: 13 Dec 1994 22:23:39 -0500
Date: 1994-12-13T22:23:39-05:00 [thread overview]
Message-ID: <3clofr$r1m@gnat.cs.nyu.edu> (raw)
In-Reply-To: 3chh6i$lp7@cnj.digex.net
Gentle's response to this question:
: type stone is array (1..2) of character;
: shapes: constant array (1..1) of stone := ("[]");
: ____________________________________________^
You're trying to squash a string of length 2 into a character space.
Try initializing like this:
shapes: constant array (1..1) of stone := (1 => ('[',']'));
is wrong, it is perfectly fine to initialze an object of type stone with
the string literal "[]
" which is essentially identical to the aggregate ('[',']')
the ONLY problem is the one element aggregate.
next prev parent reply other threads:[~1994-12-14 3:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-12-12 7:12 Ada can't initialize (aggregate) array of length 1? Dirk Zoller
1994-12-12 12:54 ` Gentle
1994-12-12 18:35 ` Bob Duff
1994-12-13 17:01 ` Jahn Rentmeister
1994-12-14 3:23 ` Robert Dewar [this message]
1994-12-12 13:20 ` R. William Beckwith
1994-12-16 13:34 ` gamache
1994-12-14 3:21 ` Robert Dewar
1994-12-16 10:37 ` Dirk Zoller
1994-12-19 14:20 ` Robert Dewar
1994-12-16 16:41 ` Scott Leschke
1994-12-17 17:52 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox