From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Single element arrays as function parameters
Date: Fri, 10 Jun 2011 22:54:47 +0200
Date: 2011-06-10T22:54:47+02:00 [thread overview]
Message-ID: <isu0aj$216$1@dont-email.me> (raw)
In-Reply-To: <86ei31v43e.fsf@gareth.avalon.lan>
Le 10/06/2011 22:11, Mart van de Wege a �crit :
> M := Init.Creature( Name => "Dwarf",
> Creature_Type => Humanoid,
> Creature_Subtype => (Dwarf) );
>
> The above call fails to compile:
>
> test_create.adb:13:45: positional aggregate cannot have one component
This is the clue: it is interpreted as a parenthesized value, not as an
aggregate. Just write:
M := Init.Creature( Name => "Dwarf",
Creature_Type => Humanoid,
Creature_Subtype => (1 => Dwarf) );
--
---------------------------------------------------------
J-P. Rosen (rosen@adalog.fr)
Adalog a d�m�nag� / Adalog has moved:
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
next prev parent reply other threads:[~2011-06-10 20:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 20:11 Single element arrays as function parameters Mart van de Wege
2011-06-10 20:54 ` J-P. Rosen [this message]
2011-06-10 21:28 ` Mart van de Wege
2011-06-10 21:58 ` Adam Beneschan
2011-06-10 22:24 ` Mart van de Wege
2011-06-11 12:28 ` Peter C. Chapin
2011-06-13 14:49 ` Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox