Re: Vertical Bars disappear for lowercase variable names?
Re: Vertical Bars disappear for lowercase variable names?
- Subject: Re: Vertical Bars disappear for lowercase variable names?
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 7 Jul 2009 12:39:59 -0400
As I understand it, variable names in AppleScript are
case-insensitive, and the vertical bars don't change that. The bars
are there so you have variable names with non-identifier characters,
or use words that would otherwise be interpreted as command
terminology. That's it. If "foo" is not an active term in the
current context, then "|foo|" refers to the same variable, as do
"Foo", "|fOo|", etc.
On 7/7/09, Jeffrey Weston <email@hidden> wrote:
> Hello,
>
> I've got an issue. I need to ensure that certain variable names are all
> lowercase. I thought putting vertical bars around the variable name would
> work but it doesn't appear to in my case.
>
> The bars disappear on compile if the variable name is all lowercase (or is
> all lowercase and contains additional legal characters [numbers or
> underscore]). If the variable name contains uppercase or illegal characters
> then the vertical bar sticks after compile.
>
> Anyone have suggestions on how to ensure the variable names remain in lower
> case? Or am I doing something wrong?
>
> Below is some code and a comment about what happens after compile:
>
> set RuNiD to "mixed without vertical bars"
>
> set |RUNID| to "uppercase" -- Vertical bars stick
> set |runID| to "mixedCase" -- vertical bars stick
> set |runID()| to "lower+illegal" -- vertical bar stick
>
> set |runid5| to "lower+number" -- Vertical bars disappear
> set |runid_| to "lower+underscoe" -- Vertical bars disappear
> set |runid| to "lowercase" -- Expect to remain all lower case (but because
> vertical bars disappear, the name matched the mixed case above.)
>
>
> Thanks
>
> Jeffrey Weston | MacWORD TEST | MacBU - MICROSOFT
> WORK: (425) 703-7684 email@hidden
> microsoft.public.mac.office.word
>
>
--
Sent from my mobile device
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden