OCLOperators let
(Created page with "Holds the result of an expression in a temporary reference to use later within the statement. let statements can chained together. '''Example 1'''<syntaxhighlight> let x = 2 in ( x + 4 ) </syntaxhighlight>'''Example 2'''<syntaxhighlight> let l = Bag{1,2,3,4} in ( let m = l->collect(i|i*4) in ( l->union(m) ) ) </syntaxhighlight>")
 
(Added Edited template with July 12, 2025.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Edited|July|12|2025}}
Holds the result of an expression in a temporary reference to use later within the statement.
Holds the result of an expression in a temporary reference to use later within the statement.


Line 17: Line 18:
)
)
</syntaxhighlight>
</syntaxhighlight>
[[Category:OCL General Operators]]

Latest revision as of 06:33, 20 January 2025

This page was created by Charles on 2024-09-21. Last edited by Edgar on 2025-01-20.

Holds the result of an expression in a temporary reference to use later within the statement.

let statements can chained together.

Example 1

let x = 2 in
(   
    x + 4
)

Example 2

let l = Bag{1,2,3,4} in
(
    let m = l->collect(i|i*4) in
    (
        l->union(m)
    )
)
MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments