[DGD] 1.3.8

Felix A. Croes felix at dworkin.nl
Tue Oct 6 23:00:43 CEST 2009


> +  - 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



More information about the DGD mailing list