comp.lang.ada
 help / color / mirror / Atom feed
* I just found that funny...
@ 1996-04-05  0:00 Jean-Pierre Rosen
  1996-04-06  0:00 ` Robert Dewar
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Pierre Rosen @ 1996-04-05  0:00 UTC (permalink / raw)


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-------------------------------------+




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-04-06  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-05  0:00 I just found that funny Jean-Pierre Rosen
1996-04-06  0:00 ` Robert Dewar
1996-04-06  0:00   ` Michael Feldman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox