[Ecls-list] turn off auto declares

Dean O'Connor dean.oconnor at ite.com.au
Wed Nov 23 21:42:01 UTC 2005


OK now this is wierd ....

I swear that was working ok. Then after a while (a few hours) it 
suddenly stopped LOL

That example you gave below no longer works !!!!
I have latest build from CVS and even rebooted PC in case it was a 
system wierdo thing.


w.r.t your point about the interaction with code that assumes global 
variables can be defined by SETQ ...

Well I load split-sequence (from CLU's) and this statement borks with  
EXT:*ACTION-ON-UNDEFINED-VARIABLE* set to 'error.

    (pushnew :split-sequence *features*)

I don't know if *features* was ever actually defined before this, or if 
its a sign there is still something wrong.

Just have to make sure we set it AFTER loading those kinda things I 
guess ... if you want to make use of this feature.

Cheers
Dean

Juan Jose Garcia Ripoll wrote:

>On Tue, 2005-11-22 at 01:58 +1100, Dean O'Connor wrote:
>  
>
>>Well errr ... I don't know really. I just found that CMUCL link and 
>>thought it might be a clue for ECL.
>>
>>Perhaps I am asking something silly .... but let me be more specific ...
>>
>>I am converting old Emac Lisp scripts to work under ECL. These old 
>>scripts used global variables everywhere. They just set them in 
>>functions with a "setq".
>>There are no LETs or even DEFVAR/PARAMETERS.
>>I am trying to convert them to local (and some dynamic/special) 
>>variables, but its difficult to be sure I don't miss any.
>>    
>>
>
>Latest change (in CVS):
>
> - A new global variable EXT:*ACTION-ON-UNDEFINED-VARIABLE* controls whether
>   the interpreter complains when you try to assign a value to a symbol that
>   has not been defined as variable. An example
>
>	> (SETQ S 1)	; No complain
>	1
>	> (SETQ EXT:*ACTION-ON-UNDEFINED-VARIABLE* 'ERROR)
>	ERROR
>	> (SETQ X 1)	; Ooops, X had not been defined before!
>	Undefined variable referenced in interpreted code.
>	Name: X
>	>> :q
>	> (DEFVAR X 1)
>	X
>	> (SETQ X 1)
>	1
>
>I am not sure about the interaction between this code and code that
>assumes global variables can be defined by SETQ. Notice however an
>important difference between ECL and CMUCL:
>
>	In standard ECL, doing (SETQ X 1) on a previously
>	undefined variable X does not make X special!!!!
>
>In otherwords, (SETQ X 1) assigns a value to the symbol X but is not
>equivalent to (DEFPARAMETER X 1).
>
>Regards
>
>Juanjo
>
>  
>




More information about the ecl-devel mailing list