TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Simon Wright <[log in to unmask]>
Reply To:
Simon Wright <[log in to unmask]>
Date:
Sat, 17 Feb 2001 07:07:29 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
> From: Greg Bek <[log in to unmask]>

> I tried a couple of different things before your final line of
> output:
>     Ada.Text_Io.Put_Line ("Image is " & Month_Type'Image (Control_Data.Month));
> With Apex that raises constraint error, as the incorrect value is now
> being used.

GNAT 3.13p says Program_Error; interestingly, at the line

    type ZZZ_Single_Value_Control_Type (Field : ZZZ_Control_Fields := Date) is

though the debugger shows the Put_Line in the call stack.

> I also tried
>
>    case Control_Data.Month is
>         when January .. December =>
>             Ada.Text_Io.Put_Line ("Valid month");
>         when others =>
>             Ada.Text_Io.Put_Line ("Invalid month");
>     end case;
>
> And got "Invalid Month" output.

GNAT says "Valid Month".

ATOM RSS1 RSS2