I am not a new QGIS user, however, I am still confused concerning the quotation marks syntax ('single' vs "double").
I know something about the quotation marks and the way they are applied in Python scripting (i.e. comments, strings etc.).
There are even some related questions:
Nevertheless, I would like to clarify the details regarding the quotation marks ('single' vs "double") in the scope of QGIS.
For instance, if I type something in the Expression dialogue I will have a different output.
"something"
, it is written as
The Output is NULL
.
'something'
, it is shown as
The output is 'something'
as a string.
So, my questions are:
- What is the syntax/meaningful difference between quotation marks ('single' vs "double") in QGIS?
- Are there any other circumstances when other types of quotation marks are used in QGIS, for instance, triple quotation marks as in Python?
Answer
Double quotes indicate that the string represents the name of an attribute while a single quote is a literal string.
So in your first case you get NULL
because you don't have an attribute called something
.
No comments:
Post a Comment