<pre>function parseList2 pList  repeat with C = 1 to the length of pList    if char C of pList is not in "0123456789,."    then sayProblem "Only digits, commas or periods accepted!"  end repeat  put empty into rList  put the number of items in pList into NB  repeat with i = 1 to NB    get item i of pList    put offset("..",it) into P    if P > 0 then      put char 1 to P-1 of it into A      if A is not an integer then sayProblem A & " is not a valid number!"      delete char 1 to P+1 of it      put it into Z      if Z is not an integer then sayProblem Z & " is not a valid number!"      if Z < A then sayProblem Z && "is smaller than" && A      repeat with j = A to Z        put j & return after rList      end repeat    else      put it & return after rList    end if  end repeat  delete last char of rList  sort rList numeric  return rListend parseList2</pre>