[Qgis-developer] QgsExpression: Comment support and unary minus
Matthias Kuhn
matthias.kuhn at gmx.ch
Thu Nov 27 00:14:28 PST 2014
Hi all,
I am working on introducing comment support for QgsExpressions (See
below for examples). Line comments should be started with `--` (double
minus) like in SQL. Running the test suite on this complains, because
there is a test for unary minus that tests if `--1` evaluates properly.
And that would be considered a comment after this change, currently it
evaluates to 1 (Legitimate, but is that useful?).
Question:
* Is that a typo and it should actually be `-1`?
* Is there a reason, that `--` as initial delimiter for line comments
is not good?
------------------------
Examples:
Block comments:
/*
* Comment
*/
And line comments:
CASE
WHEN name = 'QGIS' THEN 'Yay' -- Using the good stuff
ELSE 'Nay' -- You can get it on http://qgis.org
END
More information about the Qgis-developer
mailing list