Thread overview
implicit array declaration
Jan 24, 2004
Matthew
Jan 24, 2004
J Anderson
Jan 24, 2004
Matthew
Jan 24, 2004
Ilya Minkov
January 24, 2004
I'm trying to do the following:

  int_vector_t vi3  = new int_vector_t(int[] { 10, 11. 12 });

Is there any kind of support for this in the language? If not, can we have it?



January 24, 2004
Matthew wrote:

>I'm trying to do the following:
>
>  int_vector_t vi3  = new int_vector_t(int[] { 10, 11. 12 });
>
>Is there any kind of support for this in the language? If not, can we have
>it?
>
>
>
>  
>

I asked for this also.

You meant:

 int_vector_t vi3  = new int_vector_t(int[] { 10, 11, 12 });


right?

-- 
-Anderson: http://badmama.com.au/~anderson/
January 24, 2004
"J Anderson" <REMOVEanderson@badmama.com.au> wrote in message news:butenu$qqj$1@digitaldaemon.com...
> Matthew wrote:
>
> >I'm trying to do the following:
> >
> >  int_vector_t vi3  = new int_vector_t(int[] { 10, 11. 12 });
> >
> >Is there any kind of support for this in the language? If not, can we
have
> >it?
> >
> >
> >
> >
> >
>
> I asked for this also.
>
> You meant:
>
>   int_vector_t vi3  = new int_vector_t(int[] { 10, 11, 12 });

What's the difference? Ah, the comma - doh!

:)



January 24, 2004
Matthew wrote:
> I'm trying to do the following:
> 
>   int_vector_t vi3  = new int_vector_t(int[] { 10, 11. 12 });
> 
> Is there any kind of support for this in the language? If not, can we have
> it?

This works:

const int [] vecdata = [1,2,3];
int [] vec = vecdata.dup;

However, i would expect to be able to declare arrays inline... which is not possible yet. Are there any syntactic issues or is it just not implemented? Besides, run-time construction when necessry would be so cool! ;)

-eye