Language ideas

Robert Brenstein rjb at robelko.com
Fri May 20 18:29:39 EDT 2005


>>>  > put a into b and c
>>>Or put a into b,c This is something that would be good.
>>
>>Akin to what can be done in C :) It could be a handy shortcut 
>>ocassionally but using 'and' here bother me since 'and' normally 
>>implies logical operation. May using comma would be better if there 
>>is a convincing justification to add it.
>
>My first guess of the meanings of the two are not the same.
>
>I had guessed that
>    put a into b and c
>would be the same as
>    put a into b
>    put a into c
>
>I had guessed that
>   put a into b, c
>would be the same as
>   put item 1 of a into b
>   put item 2 to -1 of a into c
>
>In both cases 'a' would be evaluated one time.
>
>We already find cases where 'and' used in a syntactic sense that is 
>not the operator 'and' and I agree--it is awkward.  However, comma 
>is the same way.  One has to be careful in passing comma'd values as 
>parameters.
>--

Agreed that either is ambigous. For me, comma is a generic list 
separator (list of parameters, list of items) so it did not imply 
splitting a into items. But I can live with and as its usage here is 
somewhat parallel to 'answer xxx with cancel or OK' (I mean the or 
here).

May be a parallel should be sought in the sort command and thus

   put a into each of b,c
or
   put a into each of b and c

Robert


More information about the use-livecode mailing list