From 20d80369d4783c2da1998a83310f414d088f4065 Mon Sep 17 00:00:00 2001 From: Niels Erik Jepsen <67169004+Niels-Erik@users.noreply.github.com> Date: Thu, 17 Oct 2024 21:42:38 +0200 Subject: [PATCH] Update docs for unbounded minimum limit --- .../basics/data-types/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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