diff --git a/src/language-tools-and-standard-library/basics/data-types/README.md b/src/language-tools-and-standard-library/basics/data-types/README.md index a5302e2b..91e6d2bc 100644 --- a/src/language-tools-and-standard-library/basics/data-types/README.md +++ b/src/language-tools-and-standard-library/basics/data-types/README.md @@ -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