gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] `name-too-long?` in `input-stream-header`


From: Anton Ertl
Subject: Re: [gforth] `name-too-long?` in `input-stream-header`
Date: Mon, 16 Nov 2015 19:24:12 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Nov 16, 2015 at 07:08:34PM +0100, Bernd Paysan wrote:
> Am Sonntag, 15. November 2015, 09:18:36 schrieb Anton Ertl:
> > On Sat, Nov 14, 2015 at 03:50:42PM +0100, Marcos Cruz wrote:
> > > I just realized (Gforth 0.7.3) that `name-too-long?` is called in
> > > `input-stream-header`, while it's also the first word called in
> > > 
> > > `header,`:
> > >   : input-stream-header ( "name" -- )
> > >   : 
> > >       parse-name name-too-short? header, ;
> > > 
> > > They are defined in <kernel/comp.fs>.
> > > 
> > > Is it an oversight?
> > 
> > Not on our part:-).  Note the difference between LONG and SHORT.
> 
> Maybe HEADER, should contain both checks.

Not really.  0-length names are ok when coming from NEXT-NAME (e.g.,
as the key in a lookup table), but usually are a mistake when coming
from the input stream (the programmer forgot the name after the
defining word).

- anton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]