home *** CD-ROM | disk | FTP | other *** search
- on IsMember locList, locVal
- return getPos(locList, locVal) <> 0
- end
-
- on IsWhite locVal
- return IsMember([" ", TAB, ENTER, RETURN], locVal)
- end
-
- on IsUpper theChar
- return (theChar >= "A") and (theChar <= "Z")
- end
-
- on IsLower theChar
- return (theChar >= "a") and (theChar <= "z")
- end
-
- on isLetter theChar
- return IsUpper(theChar) or IsLower(theChar)
- end
-
- on GetSubStr str, a, b
- set w to EMPTY
- repeat with i = a to b
- set w to w & char i of str
- end repeat
- return w
- end
-
- on FindCharpos str, ch
- set foundat to 0
- repeat with i = 1 to the number of chars in str
- if char i of str = ch then
- set foundat to i
- exit repeat
- end if
- end repeat
- return foundat
- end
-
- on Digit theChar
- set theDigit to charToNum(theChar) - charToNum("0")
- return theDigit
- end
-
- on number theWord
- set wordLen to length(theWord)
- set digitValue to 1
- set totalVal to 0
- repeat with digitPos = wordLen down to 1
- set totalVal to totalVal + (Digit(char digitPos of theWord) * digitValue)
- set digitValue to digitValue * 10
- end repeat
- return totalVal
- end
-
- on Red
- if the colorDepth = 32 then
- set theRed to 16711680
- else
- set theRed to 35
- end if
- return theRed
- end
-
- on Blue
- if the colorDepth = 32 then
- set theBlue to 100
- else
- set theBlue to 240
- end if
- return theBlue
- end
-