Hi Alex,

>> is this supposed to happen?
>> ..
>> : (onOff)
>> -> T
>> : (show NIL)
>> T T
> Oops, no. But if I try here:
> : (onOff)
> !? (onOff)
> NIL -- Protected symbol
> ?         
> I really don't remember, but it could well be that I "repaired" that
> in the course of rewriting some parts while codig the 64-bit version.

I see, my example was with v2.3.5, your is with v2.3.7.

>> (onOff sym ..) -> flg
>>    Logical negates the VAL's of all argument symbols sym. Returns the
>>    new value of the last symbol.
>> - Should not the symbol names be passed explicitly?
> Yes. But on the other hand, missing arguments usually default to NIL in
> picoLisp. Makes not much sense in the case of 'onOff'.

I know, but it still doesn't make sense even in v2.3.7.

: (onOff)

is the same as

: (onOff . NIL)

Now using this logic, 

: (onOff A B)

shoud be the same as:

: (onOff A B . NIL)

why is it trying to set NIL in the first case and not in the second

>> - Why does it return value of the last symbol?
> What would you return instead? Most similar functions like 'on', 'off',
> 'zero' or 'setq' do the same.

Well, I thought it might be more convenient not to specify return values
for some functions to allow for some optimizations but I guess it is not
an issue here.

Thank you,

UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to