• 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: How to disable the -- comment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to disable the -- comment


  • Subject: Re: How to disable the -- comment
  • From: "Mark J. Reed" <email@hidden>
  • Date: Tue, 23 Mar 2010 08:32:40 -0400

Your problem is not what you think it is; -- is not a comment inside
quotation marks.

You have an odd number of backslashes in this string:

"--no-align --tuples-only -R '\\\' -F ';' "

Backslashes in AppleScript strings can only come before a quotation
mark (which is what the "expected" error is telling you) or another
backslash, not an apostrophe.  You need to figure out what the string
needs to look like when run from Terminal and then just double all the
backslashes for the AppleScript string literal.


> set resultText to psqlCommand & space & DatabaseName & space & "--no-align
> --tuples-only -R '\\\' -F ';'" & space & "--command " & (quoted form of
> sqlCommand)
> Now, I'm incurring in an AS error because the -- string is dealt with like a
> comment therefore the set command, according to AS is like this
>  resultText to psqlCommand & space & DatabaseName & space & "
> How can I tell AS not to interpret -- as a comment?
> Ciao
> Vittorio
>  _______________________________________________
> 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
>



--
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

References: 
 >How to disable the -- comment (From: Vittorio <email@hidden>)

  • Prev by Date: How to disable the -- comment
  • Next by Date: Re: AppleScript access to databases
  • Previous by thread: How to disable the -- comment
  • Next by thread: new line when writing to text file
  • Index(es):
    • Date
    • Thread