Posts: 451
Threads: 34
Likes Received:
359 in 246 posts
Likes Given: 178
Joined: Aug 2023
Reputation:
17
Hi,
1] You have to add the items in a loop one at a time, or if they can be set from an existing SB array (LDList.CreateFromIndices or LDList.CreateFromValues) or from a file (LDList.Read), so it depends on the source of the data for the list.
2] When an item is added to the List it is appended to the end. Internally the items in a list are re-ordered as the list changes, so the indices always run from 1 to LDList.Count.
Posts: 21
Threads: 4
Likes Received:
3 in 3 posts
Likes Given: 0
Joined: Sep 2023
Reputation:
0
so, if I understand correctly the ldlist is like creating a text file say --- vocablist, and within that file it contain the data or words in this case, am I correct to visualise like this? The trouble for me is that if I can not understand the logic I just could not utilise it. And the indices would be the order of the words in the file...
Am I correct by thinking it like this?
Posts: 136
Threads: 10
Likes Received:
37 in 31 posts
Likes Given: 29
Joined: Oct 2023
Reputation:
3
Yumda says:
so, if I understand correctly the ldlist is like creating a text file say --- vocablist, and within that file it contain the data or words in this case, am I correct to visualise like this? The trouble for me is that if I can not understand the logic I just could not utilise it. And the indices would be the order of the words in the file...
Am I correct by thinking it like this?
Yumda,
Yes you are correct. It is just lines of text with the indexes in front of them. Here is a code snippet to see how it works.
filepath="c:\temp\myfolder\myfile.txt"
name="myList"
LDList.Add(name,"Dog")
LDList.Add(name,"cat")
LDList.Add(name,"Rat")
LDList.Print(name)
LDList.write(name,filepath,"False")
'Then look in the filepath and you will see your list as a .txt file
I hope this helps!
JR
Posts: 21
Threads: 4
Likes Received:
3 in 3 posts
Likes Given: 0
Joined: Sep 2023
Reputation:
0
Lots of Thanks to AbsoluteBeginner, Litdev and jrmrhrb00 for all your help. A new learning curve, but I got it.
Thanks!!!
regards