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,e6986328aee8b47b,start X-Google-Attributes: gid103376,public From: pac@runet.edu (Michael A. Packer) Subject: GNAT bug? with ada.calendar Date: 1996/09/23 Message-ID: <526bpu$nn4@newslink.runet.edu>#1/1 X-Deja-AN: 184803883 organization: Radford University newsgroups: comp.lang.ada Date: 1996-09-23T00:00:00+00:00 List-Id: I gave a student a program to work on in our intro to computer programming class using the + function as defined in ada.calendar and he came back with something that I didn't think should even compile but strangely enough it does....can someone explain why? ============================================================================== with ada.text_io; with ada.integer_text_io; with ada.calendar; procedure test_calendar is x1 : duration := duration(5676); x2 : duration := duration(3456); x3 : duration := duration(0); begin x3 := ada.calendar."+" (x1,x2); ada.integer_text_io.put (integer(x1),1); ada.text_io.new_line; ada.integer_text_io.put (integer(x2),1); ada.text_io.new_line; ada.integer_text_io.put (integer(x3),1); ada.text_io.new_line; end test_calendar; ============================================================================== > gnatmake -v GNATMAKE 3.05 (960607) Copyright 1995 Free Software Foundation, Inc. Usage: gnatmake opts name {[-cargs opts] [-bargs opts] [-largs opts]} the specs for + don't show calling it with left = duration and right=duration and result also being a duration type.... -- Ph. 540-831-5978 Radford Univ. CS SysAdmin http://www.runet.edu/~pac Nascar Pick12 Contest: http://www.cs.runet.edu/~pac/pick12.html All I ask is a chance to prove that money can't make me happy. Make it idiot proof and someone will make a better idiot.