comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@futureapps.invalid>
Subject: qualified expressions acting as names - not accepted?
Date: Sun, 21 Aug 2016 17:56:41 +0200
Date: 2016-08-21T17:56:41+02:00	[thread overview]
Message-ID: <npcivp$6jf$1@dont-email.me> (raw)

The compiler accepts line (1) below, but neither (2) or (3).
It says it is expecting Standard.Integer, not Standard.Boolean.
Is this a bug in the program or bug in the compiler?
(String'("AZ")(1) in a similar program is accepted.)

procedure Qualified is
    type S is array (Boolean) of Character;
    
    X: Character;
    Z: constant S := "AZ";
begin
    X := Z       (False);	-- (1)
    X := S'(Z)   (False);	-- (2)
    X := S'("AZ")(False);	-- (3)
end;


-- 
"HOTDOGS ARE NOT BOOKMARKS"
Springfield Elementary teaching staff


             reply	other threads:[~2016-08-21 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21 15:56 G.B. [this message]
2016-08-22  1:25 ` qualified expressions acting as names - not accepted? Shark8
2016-08-22 10:00 ` AdaMagica
2016-08-23  7:03   ` G.B.
replies disabled

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