Parenthesis will no longer work when you update to the nightly. Then you 
need the Tuple{} style. The reason for this is that there is now a 
difference between a tuple type (like (Int, Int)) and the actual tuple 
(like (5, 3)).

On Wednesday, April 22, 2015 at 6:21:56 PM UTC+2, Wai Yip Tung wrote:
>
> Thank you. I'm using Julia v3.5. (Int32, Int32)[] works for me.
>
> So both parenthesis and braces are going to work? I am not crazy to get 
> confused between them :)
>
> Wai Yip
>
>   Kristoffer Carlsson <javascript:>
>  Tuesday, April 21, 2015 10:22 AM
> In v0.3 you would use (Int32, Int32)[]
>
> In nightly it is Tuple{Int32, Int32}[]
>
>
> On Tuesday, April 21, 2015 at 7:12:01 PM UTC+2, Wai Yip Tung wrote:
>   Wai Yip Tung <javascript:>
>  Tuesday, April 21, 2015 10:12 AM
> I have a newbie question. I have programming background in Python, Java, 
> C. In some cases in Julia, like an empty array, I need to explicitly 
> specify the type. I am rather confused about the syntax. There a a few 
> plausible options like parenthesis, braces, colon. I have trouble to pick 
> the right one. Right now I want to declare a one dimensional array of tuple 
> of two integers. I tried this and it does not work.
>
>     (Tuple{Int32,Int32})[]
>
> I hope you can point me to use the syntax correctly
>
> Thanks,
>
> Wai Yip
>
>   

Reply via email to