TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Programming Language Advocacy (83 & 95)" <[log in to unmask]>
X-To:
Team Ada <[log in to unmask]>
Date:
Fri, 3 Jun 2005 09:24:48 -0700
Reply-To:
Chris Sparks <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset=us-ascii; format=flowed
From:
Chris Sparks <[log in to unmask]>
Parts/Attachments:
text/plain (21 lines)
Hello experts!

I thought I understood discriminants, however, when I tried to assign to 
MR2 and MR3 below, the compiler barked at me...

----------------------------------------------------
  type My_Record (Item : Integer := 1;
                  Data : Integer := 2) is record
    Stuff : Integer := Item * Data;
  end record;

  MR1 : My_Record;
--MR2 : My_Record (Data => 3);
--MR3 : My_Record (Item => 3);
  MR4 : My_Record (Item => 10, Data => 11);
----------------------------------------------------

Can someone enlighten me on this?

Chris Sparks

ATOM RSS1 RSS2