The D Programming Language: cases (fallthrough)
Dave Decot
decot at hpisod2.HP.COM
Mon Mar 7 17:41:48 AEST 1988
> The following example is illustrative syntax only:
>
> [int *,int] foobar();
> ....
> [ptr,flag] = foobar(arg)
> int arg;
> {
> int *a, *b;
> ....
> return [a,1];
> ....
> return [b,0];
> }
How about this syntax:
struct foo { int *x, y; } foobar();
struct foo foobar(arg)
int arg;
{
int *a, *b;
...
return {a, 1};
...
return {b, 0};
}
This way, all you're adding to the existing language is aggregate expressions.
Dave Decot
hpda!decot
More information about the Comp.lang.c
mailing list