[DGD] 1.3.8

Par Winzell par.winzell at alyx.com
Tue Oct 6 23:06:13 CEST 2009


This is such a wonderful language extension.

Felix A. Croes wrote:
>> +  - Allow ({ a, b }) = array; to facilitate returning multiple values from a
>> +    function.
> 
> This makes possible the following:
> 
>     int time;
>     float millisec;
> 
>     ({ time, millisec }) = millitime();
> 
> Any kind of array can be used for assignment, not just a function return
> value.  So the following will also work:
> 
>     int a, b, c;
> 
>     ({ a, b, c }) = ({ 1, 2, 3 });
> 
> though this would be somewhat less efficient than performing distinct
> assignments.
> 
> Regards,
> Felix Croes
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd




More information about the DGD mailing list