oops, made a mistake... I meant, like this function NumCharsInString pAsciiChar,pString put numtochar(pString) into tChar put 0 into tCount repeat for each char tCharToCheck in pString if tChar = tCharToCheck then add 1 to tCount end repeat return tCount end NumCharsInString