Arrays: Difference between revisions

Content added Content deleted
m (→‎{{header|Python}}: Mention slicing. Poke page to see if SMW syncs.)
m (update for versions 1.0+)
Line 4,712: Line 4,712:
=={{header|Julia}}==
=={{header|Julia}}==
Julia has both heterogeneous arrays and typed arrays.
Julia has both heterogeneous arrays and typed arrays.
<pre>julia> A = cell(3) # create an heterogeneous array of length 3
<pre>julia> A = Vector(undef, 3) # create an heterogeneous 1-D array of length 3
3-element Array{Any,1}:
3-element Vector{Any}:
#undef
#undef
#undef
#undef
Line 4,738: Line 4,738:
in push! at array.jl:488
in push! at array.jl:488


julia> ['a':'c'] # type inference
julia> ['a':'c'...] # type inference
3-element Array{Char,1}:
3-element Vector{Char}:
'a': ASCII/Unicode U+0061 (category Ll: Letter, lowercase)
'a'
'b': ASCII/Unicode U+0062 (category Ll: Letter, lowercase)
'b'
'c': ASCII/Unicode U+0063 (category Ll: Letter, lowercase)</pre>
'c'</pre>


=={{header|KonsolScript}}==
=={{header|KonsolScript}}==