Author |
Message
|
busy_chap |
Posted: Thu Mar 26, 2009 11:39 am Post subject: Code recommendations-Best Practices |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
Does anybody know what is the recommendation around the following statement?
SET ref.tag1.tag2 = varA ;
Or
SET ref.”tag1”.”tag2” = varA;
Just wanted to know if the quotes are a standard.
Thanks. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Mar 26, 2009 11:54 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
I personally prefer to see things not quoted and most of the code I read does not have them quoted.
I only add the quotes when I need to. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Mar 26, 2009 11:56 am Post subject: Re: Code recommendations-Best Practices |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
busy_chap wrote: |
Just wanted to know if the quotes are a standard. |
Quotes in ESQL have meanings. Don't use them unless they are significant within your code. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
busy_chap |
Posted: Thu Mar 26, 2009 12:03 pm Post subject: |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
My observation was that some ESQL worked with quotes and sometimes it doesn't though it is a same type of statement. I wanted to know more of when do I use quotes and when do i not?
So from both of your words looks like quotes should not be used unless really needed for the respective type of ESQL statement. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 26, 2009 12:05 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Double quotes in ESQL have an exact, specific, documented purpose.
They are distracting otherwise, so should not generally be used. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Mar 26, 2009 2:50 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
ASCII double quotes in ESQL have an exact, specific, documented purpose.
Windows ”smart” quotes generate a syntax error:
Quote: |
BIP2554E: Unrecognized character '”' in input. |
 |
|
Back to top |
|
 |
|