Use list instead of array
Posted: Sat Mar 25, 2023 3:17 pm
Hi,
I am not familiary with list. In below code, I use dynamic array that I need to redim as needed. If I want to use list, Please advise how to delare the varibles?
Thanks
Allen
I am not familiary with list. In below code, I use dynamic array that I need to redim as needed. If I want to use list, Please advise how to delare the varibles?
Code: Select all
#MaxSongInDir=1
#MaxDir=1
Structure Songs ; store all songs name in an sub directory (Path$)
Path$
SongQty.i
Array SongName$(#MaxSongInDir)
EndStructure
Structure DirInfos ; store the song info in an parent directory
TotalSong.i
TotalDir.i
Array DirNo.Songs(#MaxDir)
EndStructure
Global Dim RootDir.DirInfos(2)
ReDim RootDir(1)\DirNo(2)
ReDim RootDir(2)\DirNo(1)\SongName$(3)
Allen