From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7e3f2390630f30a3 X-Google-Attributes: gid103376,public From: Gerald Kasner Subject: Re: URGENT: year 2000 compliance Date: 1999/08/24 Message-ID: <37C28246.504D28BD@Physik.Uni-Magdeburg.DE>#1/1 X-Deja-AN: 516538555 Content-Transfer-Encoding: 7bit References: <935487077.548895@dedale.pandemonium.fr> Content-Type: text/plain; charset=us-ascii X-Trace: 24 Aug 1999 13:28:01 +0100, loriot.cs.uni-magdeburg.de Organization: Uni Magdeburg MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-08-24T00:00:00+00:00 List-Id: =:-) Vincent wrote: > > Does anybody know if GNAT 3.10p is Y2K compliant ? > > Thanks There is a very carefully written test software, which I release to the public. =;-)). --################################################################## with Ada.Text_Io; with Ada.Long_Float_Text_Io; with Ada.Integer_Text_IO; procedure y2k is procedure Read_Num( S: String ) is Num: Long_Float; Last_Char_Pos: Positive; begin Ada.Long_Float_Text_Io.Get( S, Num, Last_Char_Pos ); Ada.Text_Io.Put( "Got Number: " & S & " = " ); Ada.Long_Float_Text_Io.Put( Num ); Ada.Text_Io.Put( " Last Char Pos: " & " = " ); Ada.Integer_Text_Io.Put( Last_Char_Pos ); Ada.Text_Io.New_Line; exception when others => Ada.Text_Io.Put( "No year 2000 compilance : " & S ); Ada.Text_Io.New_Line; end; a,b,c : Long_Float; begin a:=1.0E36; b:=2.0E-33; c:=a*b; -- for y2k test =;-)) Read_num( Long_Float'Image(c)); Read_Num( Long_Float'Image(a) ); Read_Num( Long_Float'Image(b) ); Read_Num( "1.00000000E36"); -- ok but now the IMPORTANT y2k BUG Read_Num( "2.00000000E-33"); -- ;-) end y2k; --###################################################################