Bill Allombert on Wed, 03 Sep 2008 17:57:51 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: functions in dot notation

On Wed, Sep 03, 2008 at 02:59:05PM +0200, John Gerdeman wrote:
> Hello,
> I was wondering about the following behavior of functions in dot
> notation. Functions in  dot notation, seem to have no problem changing
> integers, that are available globally. Trying to let them manipulate
> lists, that are equally available fails.
>  integer.function={
>  	value=4;
>  }

This function take an argument 'integer', set the global variable 'value' to
4 and return 4. The content of integer is ignored.

> test()={
> 	LIST=List([2,2]);
> 	print("    set LIST to arbitrary value: ", LIST);
> 	LIST.initialize;
> 	print("    LIST should now return List([]): ",LIST);
> }
> LIST.initialize={
>  	LIST=listcreate(4);
>  }

Note that you used the same name 'LIST' twice, instead of two name
integer and value as above. This explain the discrepancy.

This function take an argument LIST, set it to listcreate(4), and return
listcreate(4). It does not affect the global variable LIST.

This is correct. I you really want to change the global variable LIST,
try this function instead:


> P.S.: Is there a way to let the mailserver know I'm a real person? I
> reply to its validation requests, but it still sends me an email, saying
> my message was blocked along with like 5 to 10 registration validation
> emails from various sites.

No, but we are planning to switch to another list server really soon