{ } vector syntax is discontinued?

1,069 views
Skip to first unread message

Simon Frost

unread,
Aug 22, 2016, 5:13:22 AM8/22/16
to julia-users
Dear All,

Apologies if this is mentioned somewhere, but I couldn't find the answer in various searches. What does '{ } vector syntax is discontinued' mean, and what is the new syntax?

Best
Simon

Mauro

unread,
Aug 22, 2016, 5:19:14 AM8/22/16
to julia...@googlegroups.com
It used to mean Any[], but not anymore (so `Any[]` is the new syntax).
It was still usable in 0.4 with a deprecation warning, now in 0.5 an
error is thrown. It will get a new meaning in the 0.6 release, but it
is not decided for what yet. See e.g.:
https://github.com/JuliaLang/julia/issues/8470

Simon Frost

unread,
Aug 23, 2016, 9:06:24 AM8/23/16
to julia-users
Thanks for the info; it still isn't clear to me how the (generic) call to this function should be changed:

function cvode{f,r,T}(::Type{f},::Type{r},d::Array{Int64},p::Vector{T}, y0::Vector{Float64}, t::Vector{Float64}; reltol::Float64=1e-4, abstol::Float64=1e-6)

Scott T

unread,
Aug 23, 2016, 9:11:44 AM8/23/16
to julia-users
Looks like like 5 uses the old syntax:

flag = Sundials.CVodeSetUserData(mem, {f,r,d,p})

Try:

flag = Sundials.CVodeSetUserData(mem, [f,r,d,p])

Scott T

unread,
Aug 23, 2016, 9:13:26 AM8/23/16
to julia-users
And again at lines 30 and 40 in that file.
Reply all
Reply to author
Forward
0 new messages