I am having trouble getting the return to work in a handler. The display dialog just before the return shows the correct results but the display dialog following the call to the handler shows the original value s.
This must be simple but I can just not find the answer and any suggestions or help would be appreciated.
Roger
set s to "cat"
upperCase(s)
display dialog s
on upperCase(s)
set uc to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set lc to "abcdefghijklmnopqrstuvwxyz"
repeat with i from 1 to 26
set AppleScript's text item delimiters to character i of lc
set s to text items of s
set AppleScript's text item delimiters to character i of uc
set s to s as text
end repeat
set AppleScript's text item delimiters to ""
display dialog s & " 1"
return s
end upperCase