Microsoft Small Basic

Program Listing: LCQ579
TextWindow.ForegroundColor="White"
TextWindow.WriteLine("***********************************")
TextWindow.WriteLine("*********How Many Letters?*********")
TextWindow.WriteLine("***********************************")
start:
TextWindow.ForegroundColor="Yellow"
TextWindow.WriteLine("")
TextWindow.WriteLine("Write The Word Here:")
TextWindow.ForegroundColor="White"
read=TextWindow.Read()
lgt=Text.GetLength(read)
spc=Text.GetIndexOf(read," ")
If Text.IsSubText(read," ") Then
lgt=lgt-1
EndIf
TextWindow.ForegroundColor="Yellow"
TextWindow.Write("The Word have ")
TextWindow.ForegroundColor="Red"
TextWindow.Write(lgt)
TextWindow.ForegroundColor="Yellow"
TextWindow.WriteLine(" letters.")
Goto start