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


Groups > comp.lang.forth > #13549

Re: ANS' EVALUATE and related issues

Date 2012-07-04 08:10 -1000
From "Elizabeth D. Rather" <erather@forth.com>
Organization FORTH, Inc.
Newsgroups comp.lang.forth
Subject Re: ANS' EVALUATE and related issues
References <jstbq0$l4f$1@speranza.aioe.org> <8qqdnSVPp7lH2G7SnZ2dnUVZ_gydnZ2d@supernews.com> <jt11a0$2v1$1@speranza.aioe.org>
Message-ID <7fudndv-sv2yGmnSnZ2dnUVZ_sqdnZ2d@supernews.com> (permalink)

Show all headers | View raw


On 7/3/12 11:12 PM, Rod Pemberton wrote:
> "Elizabeth D. Rather" <erather@forth.com> wrote in message
> news:8qqdnSVPp7lH2G7SnZ2dnUVZ_gydnZ2d@supernews.com...
>> On 7/2/12 1:46 PM, Rod Pemberton wrote:
> ...
>
>>> 6.1.1360 EVALUATE
>>> "[...] Make the string described by 'c-addr' and 'u' both the input
>>> source and input buffer, [...] "
>>>
>>> Does that mean I can CMOVE the EVALUATE string to TIB?  Or,
>>> must the original string in it's original location be parsed?  It says
>>> to make the string *described* by ...  It doesn't say the original
>>> string, in the original location, must be used or parsed in place.  Is
>>> that an acceptable interpretation?  Or, am I placing emphasis where
>>> it's not present?  What is the intent here?  I.e., is it legitimate to
>>> copy the original string to another buffer and process that secondary
>>> buffer?  That's what I did, copying it to TIB .
>>
>> It's up to you whether you move it or not, [...]
>>
>
> So, you believe copying the input to EVALUATE is acceptable.

Sure, providing you don't do it in a way that will compromise something, 
such as other text waiting to be interpreted. However, most 
implementations don't find copying necessary.

>> [...] but you may *not* move it to TIB, since you aren't entitled
>> to write to TIB
>
> Uh...  Why?
>
> Does TIB qualify as "input buffer" according to ANS?  I thought so.  Unless
> I misunderstood, the quote (below) states "programs" aren't allowed to write
> to TIB, but "system" words, like EVALUATE, are allowed to write to TIB...
> Moving up the ANS quote for reference:

Sure. TIB stands for "Terminal Input Buffer". It may contain the last 
stuff you typed. Surely you don't want to overwrite that while there's 
still text there to be interpreted?

The "input buffer" is what is being interpreted (specified by SOURCE). 
It might be the terminal input buffer, a line from a file, a block, a 
string somewhere, ...

>>> 3.3.3.5 Input Buffers
>>> "[...] A program shall not write into the input buffer. [...]"
> ...
>
>> (to do so would destroy its prior contents, as others have pointed out).
>
> Yes.
>
> I'll check, but I'm fully confident it will corrupt anything after
> EVALUATE if the input string is sufficiently long enough.

Right. Thou shalt not clobber text that's waiting to be interpreted.

>> Most implementations do not move the string.
>
> Ok.  Thanks.
>
>> There are a number of potential "input buffers": terminal input, files,
>> blocks, and EVALUATE strings. It's really necessary for INTERPRET to be
>> able to work on all of them, interchangeably and in any order.
>
> Yes, I've not implemented most of those "input buffers".

Ok, just don't preclude the possibility of supporting them.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

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


Thread

ANS' EVALUATE and related issues "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-07-02 19:46 -0400
  Re: ANS' EVALUATE and related issues BruceMcF <agila61@netscape.net> - 2012-07-02 17:01 -0700
    Re: ANS' EVALUATE and related issues Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-03 15:00 +0000
      Re: ANS' EVALUATE and related issues anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-03 15:33 +0000
  Re: ANS' EVALUATE and related issues Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-03 02:54 -0500
    Re: ANS' EVALUATE and related issues Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-03 03:32 -0500
  Re: ANS' EVALUATE and related issues Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-03 03:53 -0700
    Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-03 08:50 -1000
  Re: ANS' EVALUATE and related issues Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-03 03:47 -0700
    Re: ANS' EVALUATE and related issues "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-07-04 05:14 -0400
      Re: ANS' EVALUATE and related issues Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 04:10 -0700
        Re: ANS' EVALUATE and related issues Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 06:34 -0500
          Re: ANS' EVALUATE and related issues Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 05:22 -0700
            Re: ANS' EVALUATE and related issues Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-05 04:08 +0000
              Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-04 18:32 -1000
                Re: ANS' EVALUATE and related issues Alex McDonald <blog@rivadpm.com> - 2012-07-05 05:25 -0700
                Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-05 08:04 -1000
          Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-04 08:02 -1000
        Re: ANS' EVALUATE and related issues Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-05 03:58 +0000
  Re: ANS' EVALUATE and related issues anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-03 10:22 +0000
  Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-03 09:19 -1000
    Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-03 09:35 -1000
    Re: ANS' EVALUATE and related issues "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-07-04 05:12 -0400
      Re: ANS' EVALUATE and related issues Coos Haak <chforth@hccnet.nl> - 2012-07-04 17:53 +0200
      Re: ANS' EVALUATE and related issues BruceMcF <agila61@netscape.net> - 2012-07-04 08:53 -0700
      Re: ANS' EVALUATE and related issues "Elizabeth D. Rather" <erather@forth.com> - 2012-07-04 08:10 -1000
  Re: ANS' EVALUATE and related issues BruceMcF <agila61@netscape.net> - 2012-07-03 16:09 -0700

csiph-web