Hello All -
I seem to have found a bug in the Satimage.osax v3.6.1 uppercase() and lowercase() routines. For me,
return uppercase ("a") & "bcdefg"
returns “ABCDEFG”
and
return lowercase ("A") & "BCDEFG"
returns “abcdefg”
Not what I’d expect.
…Mick
Model: MacBook Pro 17"
AppleScript: 2.1.2
Browser: Firefox 20.0
Operating System: Mac OS X (10.6)
Hi,
it’s not a bug. The parentheses around one character have no effect.
First the two literal strings are concatenated then the change case operation is performed
you probably expect
return (uppercase "a") & "bcdefg"
Hi Stefan -
Still seems like a bug
but now that I know how it works, I’ll adapt. It does explain the odd parens the editor threw in my code on occasion, however.
Are there rules somewhere on parens and sub-routines? When I write my own, I need them.
…Mick
It’s just a basic rule.
Compound argument expressions are evaluated before executing the command.
Parentheses are preferred.
display dialog ("A") & "BCDEF" --> "ABCDEF"