Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,16 @@ In the following example, we show a type with three fields with different basic

```jolie
type MyType {
f1: int( ranges( [1,4], [10,20], [100,200], [300, *]) )
f2: long( ranges( [3L,4L], [10L,20L], [100L,200L], [300L, *]) )
f3: double( ranges( [4.0,5.0], [10.0,20.0], [100.0,200.0], [300.0, *]) )
f1: int( ranges( [-*,-1], [1,4], [10,20], [100,200], [300, *]) )
f2: long( ranges( [-*,-1L], [3L,4L], [10L,20L], [100L,200L], [300L, *]) )
f3: double( ranges( [-*,-1.0], [4.0,5.0], [10.0,20.0], [100.0,200.0], [300.0, *]) )
}
```

The token `*` is used for specifying an unbounded maximum limit.
The tokens `-*` and `*` is used for specifying an unbounded minimum and maximum limit.
In this example the field `f1` can be an integer which respects one of the following conditions, where `v` is the actual value:

* v <= -1
* 1 <= v <= 4
* 10 <= v <= 20
* 100 <= v <= 200
Expand Down