Comparison operators...
Posted: 15 Sep 2008 13:02
I just uploaded a new beta with the following change note:
This is necessary to make stuff like this work:
However, now I might have a better idea (and remove the enforcement of surrounding blanks which is not so nice...): New syntax rule: XY internal variables must be inside double quoted strings by law! Or more simply put: XY internal variables are literal strings! Reason: They are not "real variables" (things like $a...) from the perspective of the script, but some hardcoded magic applied to strings.
So the above example should be rewritten like this (resp. could be if I'd remove the surrounding blanks rule):
and comparison operators will work fine without surrounding blanks!
Good thinking?
Code: Select all
* Scripting, ternary conditionals:
NOTE: To prevent ambiguities with XY internal variables
(<curpath>, <xyver>...) the comparison operators must be
surrounded by blanks!Code: Select all
::$minver="7.60.0009"; assert <xyver> >= $minver,
"This script needs at least XY $minver!"So the above example should be rewritten like this (resp. could be if I'd remove the surrounding blanks rule):
Code: Select all
::$minver="7.60.0009"; assert "<xyver>">=$minver,
"This script needs at least XY $minver!"Good thinking?