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


Groups > comp.lang.forth > #42729

Re: Questions about strings

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Questions about strings
Date 2015-10-21 06:10 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2015Oct21.081044@mips.complang.tuwien.ac.at> (permalink)
References <a094319a-c257-452a-8009-e5d55ab1cdf6@googlegroups.com> <61e17390-0d18-4555-976b-f4346ae6599b@googlegroups.com> <92b1ba9c-88b2-436d-ba26-1eebd008e8f3@googlegroups.com> <n0624m$k2f$1@dont-email.me> <LeSdnd4vpdgxB7vLnZ2dnUU7-K-dnZ2d@supernews.com>

Show all headers | View raw


"Elizabeth D. Rather" <erather@forth.com> writes:
>You are correct, neither Forth94 nor Forth2012 limits the size of the 
>string in S". It is likely that some implementations use a byte for the 
>length, as that was standard practice for many years, but it seems to me 
>that that would be non-compliant. Maybe someone in the Forth 200x 
>committee would like to clarify that.

There is no limit specified, so the length of the string is only
limited by other limits, not by the standard; other limits in this
context are the available memory, and the input line length (the
standard guarantees that the TIB is at least 80 characters, file input
lines can be 128 bytes long (11.3.5), blocks can be 1024 characters
long, and an EVALUATEd string is only limited by available memory).

For interpretive S" and S\", Forth-2012 guarantees that each buffer
can hold 80 characters.

So, a standard-compliant compiled S" is able to deal with strings
longer than 255 characters, because such usage of S" can occur in
blocks and EVALUATEd strings.  Given that one usually builds S" on top
of SLITERAL, and the strings passed to SLITERAL are only limited by
memory, this just means that system implementors should implement
SLITERAL properly, and S" will be catered for.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.rigwit.co.uk/EuroForth2015/

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


Thread

Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-17 06:46 -0700
  Re: Questions about strings rickman <gnuarm@gmail.com> - 2015-10-17 11:25 -0400
    Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-17 10:43 -0700
      Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-17 17:52 +0000
      Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-17 07:56 -1000
      Re: Questions about strings rickman <gnuarm@gmail.com> - 2015-10-17 14:07 -0400
      Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-18 12:50 +1000
  Re: Questions about strings Ron Aaron <rambamist@gmail.com> - 2015-10-17 19:30 +0300
  Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-17 17:10 +0000
  Re: Questions about strings Jason Damisch <jasondamisch@yahoo.com> - 2015-10-17 10:41 -0700
    Re: Questions about strings foxaudioresearch@gmail.com - 2015-10-17 21:41 -0700
    Re: Questions about strings Johan Kotlinski <kotlinski@gmail.com> - 2015-10-18 15:40 -0700
      Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-18 13:41 -1000
        Re: Questions about strings Johan Kotlinski <kotlinski@gmail.com> - 2015-10-19 07:58 -0700
          Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-19 08:36 -1000
          Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-23 00:08 +1000
      Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-19 07:15 +0000
        Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-19 05:03 -0700
          Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-19 08:38 -1000
            Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-19 14:28 -0700
            Re: Questions about strings Alfred Singlestone <vitonis@gmail.com> - 2015-10-21 16:21 -0700
              Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-22 11:07 +1000
                Re: Questions about strings Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-27 11:29 +0100
                Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-27 06:14 -0700
                Re: Questions about strings Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-27 15:04 +0100
                Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-27 07:01 -0700
                Re: Questions about strings Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-27 15:04 +0100
                Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-27 14:26 -0700
                Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-27 11:45 -1000
                Re: Questions about strings Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-28 07:43 +0100
        Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-19 23:25 +1000
      Re: Questions about strings rickman <gnuarm@gmail.com> - 2015-10-20 14:47 -0400
        Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-20 09:48 -1000
          Re: Questions about strings rickman <gnuarm@gmail.com> - 2015-10-20 23:25 -0400
            Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-21 15:11 +1000
              Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-22 11:21 +1000
                Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-21 18:31 -1000
                Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-22 05:51 +0000
                Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-24 12:44 +1000
                Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-25 10:17 +0000
                Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-26 15:14 +1100
                Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-26 11:20 +0000
                Re: Questions about strings "HAA" <someone@microsoft.com> - 2015-10-31 00:20 +1100
                Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-30 19:06 -1000
                Re: Questions about strings Paul Rubin <no.email@nospam.invalid> - 2015-10-30 23:27 -0700
                Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-30 21:28 -1000
                Re: Questions about strings Paul Rubin <no.email@nospam.invalid> - 2015-10-31 00:37 -0700
                Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-30 21:48 -1000
          Re: Questions about strings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-21 06:10 +0000
  Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-31 10:48 -0700
    Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-31 09:57 -1000
      Re: Questions about strings Chris Curl <ccurl609@gmail.com> - 2015-10-31 13:34 -0700
        Re: Questions about strings "Elizabeth D. Rather" <erather@forth.com> - 2015-10-31 12:06 -1000
    Re: Questions about strings "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-11-02 02:34 -0500

csiph-web