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,f6c4733a3385e3f8,start X-Google-Attributes: gid103376,public From: Jean-Pierre Rosen Subject: I just found that funny... Date: 1996/04/05 Message-ID: <199604051600.SAA07609@email.enst.fr>#1/1 X-Deja-AN: 146059802 sender: Ada programming language x-sender: rosen@email.enst.fr comments: Gated by NETNEWS@AUVM.AMERICAN.EDU content-type: text/plain; charset="us-ascii" mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Windows Eudora Light Version 1.5.2 Date: 1996-04-05T00:00:00+00:00 List-Id: Recently, I needed a function that, given a month, would return the last day of the month. Since I like things that look nice in named notation, I (inadvertantly) wrote the spec as: function Last_Day (Of : Months) return Date; GNAT appropriately complained that "Of is a reserved word that cannot be used as an identifier". So the next thing that sprung to my mind was: function Last_Day (In : Months) return Date; Nooooooo ! Think of something else... function Last_Day (For : Months) return Date; Arghhhhhhh.... I ended up with: function Last_Day (Of_Month : Months) return Date; :-) +------------------------------------o-------------------------------------+ | P-mail: | E-mail: rosen@enst.fr | | ADALOG - 27 avenue de Verdun | Tel: +33 1 46 45 51 12 | | 92170 Vanves - FRANCE | Fax: +33 1 46 45 52 49 | +------------------------------------o-------------------------------------+