Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.szaf.org!news.gnuher.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Bernd Paysan Newsgroups: comp.lang.forth Subject: Re: RfD: Interpret S\" (Version 2) Date: Tue, 11 Mar 2014 21:32:48 +0100 Organization: 1&1 Internet AG Lines: 57 Message-ID: References: NNTP-Posting-Host: p4ffb9a36.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: online.de 1394569969 15296 79.251.154.54 (11 Mar 2014 20:32:49 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Tue, 11 Mar 2014 20:32:49 +0000 (UTC) User-Agent: KNode/4.11.5 Xref: csiph.com comp.lang.forth:29015 Alex McDonald wrote: > on 11/03/2014 11:18:40, "Peter Knaggs" wrote: >> The number of available buffers is defined as "At least one". As a >> number of FILE words require two strings, this would be the right time >> to change this to "at least two". > > Andrew Haley objected that it doesn't follow the zero, one, many model. Sure, but sometimes though shalt count to three, neither to two nor to four, because three is the right number. Or so. The reason for having two buffers is that RENAME-FILE needs two strings, one is clearly insufficient, and many are too many. We have other places were we don't follow this rule, either. >> The system provides transient buffers for S" and S\" strings. >> These buffers shall be no less than 80 characters in length, >> and there shall be at least two buffers. The system should >> be able to store two strings defined by sequential use of S" >> or S\". > > The length of the buffer is ambiguously defined, since 80 untranslated \l > characters (backslash-L or linefeed) requires 160 characters in the parse > buffer but only 80 characters in the S\" buffer. Actually not. The rule is "store the resulting string in the buffer". This defines it that you need to fit in the 80 translated characters, regardless how many untranslated there were (\x20 needs four untranslated characters per translated character). >> b) Add section A.11.3.4 Transient String Buffers >> >> Additional transient buffers are provided for use by S" and S\". >> The buffers should be able to store two consecutive strings, >> thus allowing the command line: >> >> S" name1" S" name2" RENAME-FILE >> >> The buffers may be implemented in a circular arrangement, where > > s/The buffers/When more than two buffers are desired, they/ "Circular" works even for just two. >> a string is placed into the next available buffer. When there >> are no buffers available, the oldest buffer is overwritten. > > This isn't the classic definition, which is an index into some space, > incremented modulo the buffer size. Yes, because the "classic definition" doesn't make much sense here. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/