Jump to content

What is the best : " or ' ?


Zopieux
 Share

Recommended Posts

Hi again,

I wonder what is the best way to declare strings : do I have to use double quotes "foo" or single quotes 'foo' ?

I ask this question because in the PHP language, it is better to use single quotes, and it could be different with AutoIt...

Best regards,

Zopieux :)

I'm not English, then please excuse my spelling :)

Link to comment
Share on other sites

  • Developers

there is no better in this case ... just convenience that's all...

eg:

"that's" is easier than 'that''s'

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I personally have a problem with single quotation since I often confuse them for apostrophe.

Example:

$var = 'The ball is not mine, it is Jona's

Although this doesn't happen to me all the time, I'd use double quotation just to be on the safe side, since after coding hundred of lines, it's hard to find that kind of mistake.

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...