• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *)


  • Subject: Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *)
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 23 Mar 2015 13:23:13 +1100

On 23 Mar 2015, at 1:49 am, Yvan KOENIG <email@hidden> wrote:

I'm reluctant to call that a bug, just an unpleasant feature

I think it's fair to call it a bug, but one that's unlikely to be fixed -- any change to the parser risks unintended consequences with existing scripts.

The problem stems from the fact that pipes are used to allow otherwise illegal characters in variable names. This is valid:

set |
(* *) -- #| to 3

So it looks like the parser is parsing for piped variable names before parsing for block comments.

OTOH, block comments have other problems too -- they treat "--" and "#" differently -- so they're better off avoided if possible, IMO. If your chosen script editor does not implement commenting and uncommenting of the selection line-by-line, it should be relatively simple to write a script to do it.


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *) (From: quark67 <email@hidden>)
 >Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *) (From: 2551 <email@hidden>)
 >Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *) (From: quark67 <email@hidden>)
 >Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *) (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *)
  • Next by Date: script won't run from Scripts menu Yosemite
  • Previous by thread: Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *)
  • Next by thread: Re: Bug? Unable to use the pipe | in AppleScript comment surrounded by (* and *)
  • Index(es):
    • Date
    • Thread