@QUANG_VU_NGUY_N_PH_M wrote:
struct Test data::Vector{Int} end Base.getindex(test::Test, index) = test.data[index]
Then, to get idex:
test = Test([1,2,3])
I can get:
test[1] test[2]
How to get the last index value
test[end]
didnot work.Thank you for reading my question
Posts: 6
Participants: 4