Microsoft Small Basic

Program Listing: ZWQ561
dataline = "123 56789 ajdjfg32 4950"
' find all spaces
' space " " characters at 4, 10, 19 positions in dataline

TestLen = Text.GetLength( dataline )
cut = TestLen
try:
PT = Text.GetSubText( dataline, 1, cut )
if Text.EndsWith(PT, 32 ) <> "True" Then
If cut > 1 then
TextWindow.WriteLine( PT +" " + ( cut ) )
cut = cut - 1
Goto try
EndIf
Else
TextWindow.WriteLine( "space found at " + ( cut ) )
cut = cut - 1
Goto try
EndIf