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


Groups > comp.lang.forth > #37338

Re: local variable

From "Alex McDonald" <blog@rivadpm.com>
Newsgroups comp.lang.forth
Subject Re: local variable
Date 2015-03-17 17:45 +0000
Organization A noiseless patient Spider
Message-ID <me9p6d$eei$1@dont-email.me> (permalink)
References <5504c7af$0$2974$426a74cc@news.free.fr> <2015Mar16.163600@mips.complang.tuwien.ac.at> <caa6849b-b85c-49b7-b06e-950a3b55e8d6@googlegroups.com> <2015Mar17.175425@mips.complang.tuwien.ac.at>

Show all headers | View raw


on 17/03/2015 16:54:28,  wrote:
> hughaguilar96@gmail.com writes:
>>On Monday, March 16, 2015 at 8:37:48 AM UTC-7, Anton Ertl wrote:
>>> grobibi <tristanhennequin@free.fr> writes:
>>> >Is there a way to bypass this because, for me, a local variable has to
>>> >behave like in lisp like this : (defun foo (x) (let ((lst)) ) ... It
>>> >will initialize lst to nil (but it can be initialized to anything.).
>>>
>>> In Gforth:
>>>
>>> : foo { x -- ? }
>>>   0 { lst } ... ;
>>
>>Your code fails under VFX:
>>
>>: foo { x -- ? } 0 { 1st } x . 1st . ;
>>Err# -421 Multiple local definitions in one word
>> -> : foo { x -- ? } 0 { 1st } x . 1st . ;
>>
>>It should fail, because this is a violation of ANS-Forth.
> 
> Not every non-standard program should fail.  If every system was
> allowed to only support standard programs, there would be no way to
> establish new common practice.
> 
> In this particular case, I think that all systems should support
> multiple locals definitions in one word.
> 
> - anton

Presumably outside of control structures and quotations.

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


Thread

local variable grobibi <tristanhennequin@free.fr> - 2015-03-15 00:43 +0100
  Re: local variable "Elizabeth D. Rather" <erather@forth.com> - 2015-03-14 15:01 -1000
    Re: local variable grobibi <tristanhennequin@free.fr> - 2015-03-15 02:50 +0100
    Re: local variable albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-15 03:02 +0000
  Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-15 02:53 +0100
    Re: local variable "WJ" <w_a_x_man@yahoo.com> - 2015-03-17 22:29 +0000
  Re: local variable hughaguilar96@gmail.com - 2015-03-14 20:45 -0700
    Re: local variable stephen@mpeforth.com (Stephen Pelc) - 2015-03-15 10:53 +0000
      Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-15 22:54 +0100
      Re: local variable hughaguilar96@gmail.com - 2015-03-15 19:45 -0700
        Re: local variable hughaguilar96@gmail.com - 2015-03-15 20:15 -0700
          Re: local variable grobibi <tristanhennequin@free.fr> - 2015-03-16 08:42 +0100
        Re: local variable stephen@mpeforth.com (Stephen Pelc) - 2015-03-16 07:51 +0000
          Re: local variable hughaguilar96@gmail.com - 2015-03-16 09:59 -0700
            Re: local variable "Alex McDonald" <blog@rivadpm.com> - 2015-03-16 20:31 +0000
            Re: local variable "WJ" <w_a_x_man@yahoo.com> - 2015-03-18 08:59 +0000
      Re: local variable "HAA" <someone@microsoft.com> - 2015-03-17 13:47 +1100
        Re: local variable stephen@mpeforth.com (Stephen Pelc) - 2015-03-17 10:59 +0000
          Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-17 18:55 +0100
            Re: local variable stephen@mpeforth.com (Stephen Pelc) - 2015-03-17 18:43 +0000
          Re: local variable "HAA" <someone@microsoft.com> - 2015-03-18 13:25 +1100
            Re: local variable "Elizabeth D. Rather" <erather@forth.com> - 2015-03-17 16:43 -1000
              Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-18 04:09 +0100
                Re: local variable "Elizabeth D. Rather" <erather@forth.com> - 2015-03-17 17:55 -1000
                Re: local variable "HAA" <someone@microsoft.com> - 2015-03-20 22:28 +1100
                Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-20 15:43 +0100
                Identifying self interest (was Re: local variable) "Alex McDonald" <blog@rivadpm.com> - 2015-03-20 15:20 +0000
            Re: local variable "WJ" <w_a_x_man@yahoo.com> - 2015-03-18 08:48 +0000
        Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-17 14:18 +0000
          Re: local variable albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-17 16:24 +0000
            Re: local variable "Alex McDonald" <blog@rivadpm.com> - 2015-03-17 16:34 +0000
            Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-18 14:32 +0000
          Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-17 20:08 +0100
            Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-18 15:21 +0000
  Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-16 15:36 +0000
    Re: local variable hughaguilar96@gmail.com - 2015-03-16 10:09 -0700
      Re: local variable "Alex McDonald" <blog@rivadpm.com> - 2015-03-16 20:24 +0000
        Re: local variable "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-03-16 19:00 -0400
          Re: local variable "Alex McDonald" <blog@rivadpm.com> - 2015-03-17 12:06 +0000
            Re: local variable stephen@mpeforth.com (Stephen Pelc) - 2015-03-17 14:37 +0000
            Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-17 18:58 +0100
          Re: local variable Doug Hoffman <glidedog@gmail.com> - 2015-03-17 08:55 -0400
          Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-17 14:15 +0000
      Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-17 16:54 +0000
        Re: local variable "Alex McDonald" <blog@rivadpm.com> - 2015-03-17 17:45 +0000
          Re: local variable Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-17 20:14 +0100
          Re: local variable anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-20 15:06 +0000
            Re: local variable hughaguilar96@gmail.com - 2015-03-20 16:14 -0700
              Re: local variable "Alex McDonald" <blog@rivadpm.com> - 2015-03-21 09:47 +0000
  Re: local variable "WJ" <w_a_x_man@yahoo.com> - 2015-03-18 05:04 +0000
  Ignore the standard Stefan Mauerhofer <smauerhofer@androsoft.ch> - 2015-03-18 04:09 -0700
    Re: Ignore the standard Doug Hoffman <glidedog@gmail.com> - 2015-03-18 07:26 -0400
      Re: Ignore the standard "WJ" <w_a_x_man@yahoo.com> - 2015-03-20 17:31 +0000
        Re: Ignore the standard Doug Hoffman <glidedog@gmail.com> - 2015-03-20 17:41 -0400
          Re: Ignore the standard "Elizabeth D. Rather" <erather@forth.com> - 2015-03-20 14:26 -1000
            Re: Ignore the standard Doug Hoffman <glidedog@gmail.com> - 2015-03-21 06:00 -0400
              Re: Ignore the standard hughaguilar96@gmail.com - 2015-03-21 15:11 -0700
          Re: Ignore the standard Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-21 02:49 +0100
            Re: Ignore the standard Doug Hoffman <glidedog@gmail.com> - 2015-03-21 06:04 -0400
    Re: Ignore the standard "Alex McDonald" <blog@rivadpm.com> - 2015-03-18 16:05 +0000
    Re: Ignore the standard "WJ" <w_a_x_man@yahoo.com> - 2015-03-20 17:13 +0000

csiph-web