Opened 5 years ago

Closed 5 years ago

#2194 closed enhancement (fixed)

WCPS - Introduce LET clause

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc:
Complexity: Medium

Description

In WCPS, one can define variables in LET clause which are substitutions in coverage expressions in RETURN clause.

The syntax is:

LET $variable1 := coverageExpression,
    $variable2 := coverageExpression,
    ...

For example:

for $c in (test_mr) 
let $a := 5, 
    $b := 10 
return $a + $b

A special case for subsets when $variable can have this syntax:

LET $variable1 := [domainIntervalList]

And WCPS shorthand subset can apply on this $variable directly, for example:

for $c in (test_mr) 
let $a := [i(20), j(40)], 
    $b := 10 
return encode($c[$a] + $b, "json")

Change History (1)

comment:1 by Bang Pham Huu, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.