Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #36100

Re: Counted string

From "Rod Pemberton" <buzz@notnotnontnooatno.cmm>
Newsgroups comp.lang.forth
Subject Re: Counted string
Date 2015-01-28 20:07 -0500
Organization Aioe.org NNTP Server
Message-ID <op.xs69e2h0v6dtjm@localhost> (permalink)
References (1 earlier) <op.xsx0jbi0v6dtjm@localhost> <d55e2379-92cb-454c-bb04-059c86ab8eb6@googlegroups.com> <ec0e2ec8-fc53-41a1-9a16-0d5d151c527e@googlegroups.com> <op.xs3o14liv6dtjm@localhost> <6a3a8959-4e74-42f8-a050-069e924fdfe2@googlegroups.com>

Show all headers | View raw


On Mon, 26 Jan 2015 22:46:05 -0500, Julian Fondren  
<julian.fondren@gmail.com> 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 <markwills1970@gmail.com>
>> 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

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Counted string Marek Brunda <marekb@phoenics.org> - 2015-01-18 23:54 -0800
  Re: Counted string "Elizabeth D. Rather" <erather@forth.com> - 2015-01-18 22:08 -1000
    Re: Counted string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-19 09:36 +0000
      Re: Counted string "HAA" <someone@microsoft.com> - 2015-01-20 00:21 +1100
        Re: Counted string Coos Haak <chforth@hccnet.nl> - 2015-01-19 14:44 +0100
      Re: Counted string Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-01-20 00:45 -0800
        Re: Counted string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-20 13:12 +0000
          Re: Counted string Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-01-21 01:05 -0800
            Re: Counted string albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-21 10:54 +0000
    Re: Counted string lehs <skydda.barnen@gmail.com> - 2015-01-30 11:18 -0800
  Re: Counted string Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-01-21 11:58 +0100
    Re: Counted string "HAA" <someone@microsoft.com> - 2015-01-22 11:49 +1100
  Re: Counted string "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-23 20:17 -0500
    Re: Counted string Marek Brunda <marekb@phoenics.org> - 2015-01-26 11:21 -0800
      Re: Counted string Mark Wills <markwills1970@gmail.com> - 2015-01-26 12:11 -0800
        Re: Counted string "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-26 21:55 -0500
          Re: Counted string Julian Fondren <julian.fondren@gmail.com> - 2015-01-26 19:46 -0800
            Re: Counted string albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-27 12:07 +0000
              Re: Counted string "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-28 20:13 -0500
            Re: Counted string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-27 15:43 +0000
              Re: Counted string Marek Brunda <marekb@phoenics.org> - 2015-01-27 13:28 -0800
                Re: Counted string Elizabeth D Rather <erather@forth.com> - 2015-01-27 13:06 -1000
                Re: Counted string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-30 17:33 +0000
            Re: Counted string "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-28 20:07 -0500
              Re: Counted string "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-28 20:16 -0500
              Re: Counted string Coos Haak <chforth@hccnet.nl> - 2015-01-29 03:14 +0100
      Re: Counted string Pablo Hugo Reda <pabloreda@gmail.com> - 2015-01-26 12:14 -0800
        Re: Counted string "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-01-26 21:55 -0500
        Re: Counted string Ron Aaron <rambamist@gmail.com> - 2015-01-27 06:55 +0200
          Re: Counted string "Alex McDonald" <blog@rivadpm.com> - 2015-01-27 14:46 +0000
      Re: Counted string "Elizabeth D. Rather" <erather@forth.com> - 2015-01-26 11:25 -1000

csiph-web