' ============================================================================
' ============================================================================
' Example of how to create Indexes and perform Case-Insensitive Searches (including wildcard searches)
' for SmallBasic v.0.8
' by Davey~Wavey, April 30th 2010 (adapted from martmen's example:KBM363)
'
' As it stands, it handles wildcard searches like: *rock, rock*, and *rock*
'
' I will leave the coding of character wildcards (?) for you to play with :-)
' ============================================================================
' ============================================================================
Init()
makeIndexes()
SearchN = "?"
While SearchN <> ""
TextWindow.Clear()
For i = 1 To Array.GetItemCount(A)
TextWindow.WriteLine(A[i])
EndFor
TextWindow.WriteLine("_________________________________________________________")
TextWindow.Write("Enter Artist or Track Title to find. Use * for wildcard searches: ")
SearchN = TextWindow.Read()
Search()
showResults()
TextWindow.WriteLine("_________________________________________________________")
TextWindow.WriteLine("")
TextWindow.Pause()
EndWhile
Program.End()
'**********************************************************************************************************
Sub Init
' here we populate our music collection array
' format:
-