Adding mulitples of the same value to a ds_list

R

Rosieu

Guest
Hi Everyone!

I was wondering if it's possible to add multiples of the same value to a ds list? For example, could I add '24' to a ds_list three times, or would the engine interpret that as an overwrite of the same value each time?

If I can add multiples of the same value, is there any way to to identify individual 'entries' in a ds_list? What I mean is (and I'm shocking at articulating this), when values are added to a ds_list, are they given some kind of index or id (for example, the first value added to the list being given [0], the second [1], as in an array, etc).

Sorry if neither of those make sense!

Anyway, thanks in advance for any help anyone can give! :)

Best wishes,
Rosieu
 

FrostyCat

Redemption Seeker
Of course you can, lists are sequential structures, similar to 1D arrays. The first entry is given the index 0, the second 1, and so on.

See the Manual for more detail.
 
R

Rosieu

Guest
Oh! I had totally forgotten about the accessors! This is my first attempt at using data structures, so I'm still getting the hang of things.

Thanks so much for your help! :)

Kind regards,
Rosieu
 
Top