Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Counted string Date: Wed, 28 Jan 2015 20:07:40 -0500 Organization: Aioe.org NNTP Server Lines: 49 Message-ID: References: <174b22de-2454-4e17-ac18-6a1333ec408f@googlegroups.com> <6a3a8959-4e74-42f8-a050-069e924fdfe2@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:36100 On Mon, 26 Jan 2015 22:46:05 -0500, Julian Fondren wrote: > On Monday, January 26, 2015 at 8:55:05 PM UTC-6, Rod Pemberton wrote: >> On Mon, 26 Jan 2015 15:11:30 -0500, Mark Wills >> wrote: >> > 2) you have to walk the entire length of a string just to get its >> length >> >> That must be done in Forth too to get the length in the first place. >> It's true that you don't need to walk the entire length of the string, >> but Forth is doing that for you. > > Huh? No. Huh? Yes. To repeat, I said the length byte of a counted string in Forth isn't set by the user or programmer. How can you disagree with that? ... I have idea what you C answer or explanation below has to do with Forth's counted strings or your disagreement with my statement on Forth. C wasn't even mentioned here ... > You seem to think that C's ways of doings things are how > things are actually done. In unix-speak, You should read section 2 of > the manpages, instead of just section 3. The fundamental I/O functions > all work with ANS Forth strings, basically. They demand buffers with > lengths. They write arbitrary, '\0'-including data into buffers and > then return a count of data written. > > http://linux.die.net/man/2/write > http://linux.die.net/man/2/read > http://linux.die.net/man/2/mmap > > C's fussing about with finding and setting the length is extra, > unnecessary effort; there's no "in the first place" about it. > I really don't understand why you posted a C explanation to a Forth statement that you disagreed with. I almost think this was in regards to another post on using C style strings for my Forth. Rod Pemberton