On Thursday, December 18, 2014 2:26:02 PM UTC-5, Stefan Karpinski wrote:
>
> Array{Int64,1} is a type – it's the type of an array with 1 dimension (a
> vector) whose elements are 64-bit signed integers. You can't push anything
> onto a type because types aren't containers. If you want to construct an
> uninitialized three value Int array, you can do this:
>
> v = Array(Int, 3)
>
>
>
Thank you.
Is the output of `help(Array)` telling me to do
Array{SomeType, some_num_of_dims}
or
Array(SomeType, some_num_of_dims)
?
> This will just have junk values gotten via malloc. If you want to
> initialize an Int array with the values 10, 11 and 12 you can do this:
>
> v = [10, 11, 12]
>
>
> It will have element type Int because all the values you gave it are Ints.
>
Right. Got that. I think I'm just still confused between Foo{}, Foo(),
Foo{}(), and Foo[].
-- John