On Thu, Dec 16, 2004 at 05:14:42PM -0300, Clodoaldo Pinto wrote:
> --- Tom Lane <tgl@sss.pgh.pa.us> escreveu:
> > Neil Conway <neilc@samurai.com> writes:
> > > Tom also suggested just adding 'elseif' as an alternative for 'elsif'.
> > > That sounds like it would be worth doing.
> >
> > I think we should go ahead and do that for 8.0. I'm getting tired of
> > reading reports that stem from this mistake (I think this is the third
> > one in the past month ...). I can't see any real downside to accepting
> > both spellings, can you?
> >
> > regards, tom lane
>
> I made the exact same mistake and it took me a good chunk of energy to figure
> it out. I didn't report it to the list. When one look at the manual it is very
> easy to read elseif in instead of elsif.
I'd vote for one of two options:
1. Accept both elseif and elsif as equivalent or
2. Add some parsing magic to give a meaningful error message so people
see it immediatly.
Maybe just match in "elseif" at beginning of a line and error out with
"maybe you meant elsif".
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.