> function CountChars pString,pChar
>   replace space with null in pString
>   replace pChar with space in pString
>   return ((the number of words of pString)-1)
> end CountChars

Whoops! Forgot to make sure it counts right if the first or last char is the
match char:

function CountChars pString,pChar
  replace space with null in pString
  replace pChar with space in pString
  put ((the number of words of pString)-1) into tNumChars
  if char 1 of pString = space then add 1 to tNumChars
  if char -1 of pString = space then add 1 to tNumChars
  return tNumChars
end CountChars


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to