comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: I just found that funny...
Date: 1996/04/06
Date: 1996-04-06T00:00:00+00:00	[thread overview]
Message-ID: <4k6lgc$288@felix.seas.gwu.edu> (raw)
In-Reply-To: dewar.828788858@schonberg

In article <dewar.828788858@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:

>Incidentally, this is a nice example on which to demontstrate an interesting
>little bit of error handling stuff in GNAT:

[snip]

>Note that GNAT guesses by your casing whether you intended to write
>an identifier or keyword. Of course it only pays attention to case *if*

>Just in case you are Mike Feldman (:-) or someone else who likes to use
>some different casing convention:
>
>     2. FUNCTION Last_Day (Of : Months) RETURN Date;
>                           |
>        >>> reserved word "OF" cannot be used as identifier
>
>     2. FUNCTION Last_Day (OF : Months) RETURN Date;
>                           |
>        >>> identifier expected

Now, now, Robert. Careful readers of the notorious programs you referred
to, with their upper-cased RESERVED WORDS, would know that the FUNCTION
would also be named

    LastDay

:-)

On a more serious note, GNAT's "learning" the lexical style of
the programmer, and using it to make better guesses at errors, is
extremely clever.

Mike Feldman




      reply	other threads:[~1996-04-06  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
replies disabled

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