You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to learn Julia and I come across this set of great tutorials.
However, when something in the tutorial went wrong, I am not yet equipped to fix it.
for the prefix notebook, the definition of DummyArray gave out an error syntax: extra token "DummyArray" after end of expression
the definition is as below:
isdefined(:DummyArray) || type DummyArray
length :: Int
read :: Vector
history :: Vector{Any}
DummyArray(length, read=[], history=[])=new(length, read, history)
end
I tried JuliaBox to run the same code, and it yielded the same error message. I am a bit lost as to what the example is trying to demonstrate and how exactly should I define a type in Julia? is it with type or struct keyword? I tried struct and no luck.
The text was updated successfully, but these errors were encountered:
Looks like @alanedelman has an updated version from a few months ago — I've not tried it but that should give us a better starting point at getting the version here back up to date!
@mbauman thanks for the pointer, tried the @alanedelman version without any luck.
Completely understand the growing pains of young language. I am interested in Julia precisely because it is at a stage where any member of the community can still contribute and shape its future. I am particularly excited because julia is mostly written in julia.
Would be great if there's an up-to-date tutorial for Julia 1.x, but I understand the resources is limited.
is there anywhere I can learn about type and struct in 1.x? some example code would be fine.
I am trying to learn Julia and I come across this set of great tutorials.
However, when something in the tutorial went wrong, I am not yet equipped to fix it.
for the prefix notebook, the definition of DummyArray gave out an error
syntax: extra token "DummyArray" after end of expression
the definition is as below:
I tried JuliaBox to run the same code, and it yielded the same error message. I am a bit lost as to what the example is trying to demonstrate and how exactly should I define a type in Julia? is it with type or struct keyword? I tried struct and no luck.
The text was updated successfully, but these errors were encountered: