| Deutsch English Français Italiano |
|
<2397304e33ac8d6e4550216a4490170e40bdc15b@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: dxf <dxforth@gmail.com> Newsgroups: comp.lang.forth Subject: Re: Naming 'n' instances or repetitions Date: Sun, 25 May 2025 13:17:15 +1000 Organization: i2pn2 (i2pn.org) Message-ID: <2397304e33ac8d6e4550216a4490170e40bdc15b@i2pn2.org> References: <02c99c0785dce8043377d34b8ad339885e2d61d1@i2pn2.org> <100sirh$lm0v$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 25 May 2025 03:17:19 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="1811353"; mail-complaints-to="usenet@i2pn2.org"; posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc"; User-Agent: Mozilla Thunderbird In-Reply-To: <100sirh$lm0v$2@dont-email.me> Content-Language: en-GB X-Spam-Checker-Version: SpamAssassin 4.0.0 On 24/05/2025 11:50 pm, Ruvim wrote: > On 2025-05-22 07:34, dxf wrote: >> I've noticed two ways of naming things 'done n times'. >> >> In SwiftForth there is: >> >> (.0) (H.0) >> >> which equate to executing '#' 'n' times. >> >> It's not clear to me why '0' was used though '0' appears in forth naming >> conventions meaning 'initialization'. >> >> In VFX Forth (and perhaps others) there is: >> >> NDROP >> >> where 'n' indicates number of executions. > > > In the word names like `ndrop`, `n>r`, `nr>` I consider `n` as an indicator of the data type on which these words operate. In the definitions for N>R NR> (I'd forgotten about them) 'n' is plainly a quantity e.g. "Remove n+1 items from the data stack [...]" >... > > In the word `shold`, `s` could indicate the character string data type, that is ( c-addr u ), but this name does not read very well because of the `sh` phoneme. But SLITERAL was ok? Prefixing in forth comes from the days when names were 3 chars plus count. While that's no longer so important it is still beneficial to put distinguishing information first. SHOLD was developed independently. Had I known HOLDS existed, I would have been torn as I had NHOLD to consider. AFAIK HOLDS was a by-product of the XCHAR proposal. SHOLD NHOLD were by-products of my floating point output package - which was mostly an exercise in numeric string manipulation.