-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.01_OS
-
Fix Version/s: V4.01_ERRATA01
-
Component/s: Protocol, URL Conventions
-
Labels:None
-
Proposal:
-
Resolution:
Our rules for the Case statement use colons to separate the condition from the value-if-true and value-if-false:
caseMethodCallExpr = "case" OPEN BWS boolCommonExpr BWS COLON BWS commonExpr BWS
*( COMMA BWS boolCommonExpr BWS COLON BWS commonExpr BWS ) CLOSE
However, timeOfDay also uses colons to separate the parts of a time of day value, including optional seconds:
timeOfDayValueInUrl = hour COLON minute [ COLON second [ "." fractionalSeconds ] ]
That means that, for certain time of day values, the case statement could be ambiguous. i.e.;
case(CreatedTime eq 10:20:15:10:10,15:20)
which could legally be parsed any of the following ways:
if CreatedTime eq 10:20 then 15:10:10 otherwise 15:20
if CreatedTime eq 10:20:15 then 10:10 otherwise 15:20
Note that the user could differentiate between these by inserting whitespace before/after the separators separating the case parameters:
case(CreatedTime eq 10:20 : 15:10:10 : 15:20)
case(CreatedTime eq 10:20:15 : 10:10 : 15:20)