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


Groups > comp.lang.forth > #43977

Re: Ann: ANS/FORTH 2012 test suite update

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Ann: ANS/FORTH 2012 test suite update
Date 2015-11-30 18:04 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2015Nov30.190422@mips.complang.tuwien.ac.at> (permalink)
References (4 earlier) <826af8af-6529-434e-a825-eb9831ef1570@googlegroups.com> <n3fn2j$kta$1@dont-email.me> <a94414af-6598-4881-87ff-b561f9a93f7a@googlegroups.com> <n3g4qm$aej$1@dont-email.me> <n3h53t$s5v$1@dont-email.me>

Show all headers | View raw


Gerry Jackson <gerry@jackson9000.fsnet.co.uk> writes:
>On 30/11/2015 00:24, Bernd Paysan wrote:
>> We recently changed Gforth so that it only warns when compile-only words are
>> encountered with ' or the interpreter, and as part of that, NAME>INTERPRET
>> has been changed not to return 0.
>
>You still can query the flags with
>> COMPILE-ONLY? ( nt -- flag ), so we could implement a NAME>INTERPRET which
>> returns 0 in that case.

I think the current approach (return the same value as ' does) is
better, for the same reasons that it is better to make these words
tickable and interpretable: It's more uniform, it's more traditional,
and it's easier to program for (no special-casing for 0 is necessary).

>So does NAME>INTERPRET return an xt that can be executed to do something 
>useful i.e. do something other than output a warning or throwing an 
>error.

If you NAME>INTERPRET or ' IF, you get the xt for the compilation
semantics of IF, and I think that's also the case for all the other
remaining compile-only words.  Likewise, if you text-interpret IF (in
either state), the text interpreter will perform the compilation
semantics (so they have all become immediate in every sense, not just
"immediate-but-...").  Example:

: foo [ if ] ." foo" then ; 
:1: warning: IF is compile-only ok
0 foo  ok
1 foo foo ok
: bar [ ' if execute ] ." bar" then ; 
:4: warning: IF is compile-only ok
0 bar  ok
1 bar bar ok

- 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

Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-27 20:06 +0000
  Re: Ann: ANS/FORTH 2012 test suite update Aliaksei Chapyzhenka <alex.drom@gmail.com> - 2015-11-27 22:19 -0800
  Re: Ann: ANS/FORTH 2012 test suite update peter.m.falth@gmail.com - 2015-11-28 10:07 -0800
    Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-29 10:13 +0000
    Re: Ann: ANS/FORTH 2012 test suite update "steve@srpalmer.me.uk" <steverpalmer27@gmail.com> - 2015-11-29 03:47 -0800
      Re: Ann: ANS/FORTH 2012 test suite update Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-29 12:41 +0000
      Re: Ann: ANS/FORTH 2012 test suite update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-29 12:41 +0000
      Re: Ann: ANS/FORTH 2012 test suite update peter.m.falth@gmail.com - 2015-11-29 08:41 -0800
        Re: Ann: ANS/FORTH 2012 test suite update peter.m.falth@gmail.com - 2015-11-29 10:47 -0800
          Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-29 20:29 +0000
            Re: Ann: ANS/FORTH 2012 test suite update peter.m.falth@gmail.com - 2015-11-29 14:44 -0800
              Re: Ann: ANS/FORTH 2012 test suite update Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-30 01:24 +0100
                Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-30 09:35 +0000
                Re: Ann: ANS/FORTH 2012 test suite update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-30 18:04 +0000
                Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-30 21:28 +0000
                Re: Ann: ANS/FORTH 2012 test suite update Bernd Paysan <bernd.paysan@gmx.de> - 2015-11-30 22:59 +0100
                Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-12-01 12:29 +0000
                Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-12-02 10:08 +0000
                Re: Ann: ANS/FORTH 2012 test suite update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-05 15:57 +0000
              Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-30 09:49 +0000
                Re: Ann: ANS/FORTH 2012 test suite update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-11-30 18:16 +0000
                Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-30 21:28 +0000
              Re: Ann: ANS/FORTH 2012 test suite update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-11-30 10:25 +0000
          Re: Ann: ANS/FORTH 2012 test suite update "Elizabeth D. Rather" <erather@forth.com> - 2015-11-29 13:14 -1000
          Re: Ann: ANS/FORTH 2012 test suite update steverpalmer27@gmail.com - 2015-11-30 03:51 -0800
            Re: Ann: ANS/FORTH 2012 test suite update peter.m.falth@gmail.com - 2015-11-30 09:00 -0800
              Re: Ann: ANS/FORTH 2012 test suite update "Elizabeth D. Rather" <erather@forth.com> - 2015-11-30 07:54 -1000
                Re: Ann: ANS/FORTH 2012 test suite update Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-30 18:25 +0000
                Re: Ann: ANS/FORTH 2012 test suite update "Elizabeth D. Rather" <erather@forth.com> - 2015-11-30 11:06 -1000
      Re: Ann: ANS/FORTH 2012 test suite update "Elizabeth D. Rather" <erather@forth.com> - 2015-11-29 13:08 -1000

csiph-web