comp.lang.ada
 help / color / mirror / Atom feed
* qualified expressions acting as names - not accepted?
@ 2016-08-21 15:56 G.B.
  2016-08-22  1:25 ` Shark8
  2016-08-22 10:00 ` AdaMagica
  0 siblings, 2 replies; 4+ messages in thread
From: G.B. @ 2016-08-21 15:56 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-23  7:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21 15:56 qualified expressions acting as names - not accepted? G.B.
2016-08-22  1:25 ` Shark8
2016-08-22 10:00 ` AdaMagica
2016-08-23  7:03   ` G.B.

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