diff --git a/examples/boolean/boolean.md b/examples/boolean/boolean.md index 67bbd3ca3a..44dce2b469 100644 --- a/examples/boolean/boolean.md +++ b/examples/boolean/boolean.md @@ -1,6 +1,6 @@ # Boolean -The `boolean` type has two values: `true`, `false`. The `!` operator works on booleans only. `&&` and `||` operators short-circuit as in C. Usual comparison operators (`==`, `!=`, `<`, `>`, `<=`, and `>=`) produce boolean values. +The `boolean` type has two values: `true`, `false`. The `!` operator works on booleans only. `&&` and `||` operators short-circuit - the second operand is not evaluated if the result of evaluating the first operand is sufficient to identify the result of the logical expression. Usual comparison operators (`==`, `!=`, `<`, `>`, `<=`, and `>=`) produce boolean values. ::: code boolean.bal ::: diff --git a/examples/floating-point-numbers/floating_point_numbers.md b/examples/floating-point-numbers/floating_point_numbers.md index 77af3299f0..77ad0312cb 100644 --- a/examples/floating-point-numbers/floating_point_numbers.md +++ b/examples/floating-point-numbers/floating_point_numbers.md @@ -1,6 +1,6 @@ # Floating point numbers -The `float` type is IEEE 64-bit binary floating point (same as `double` in Java) and supports the same arithmetic operators as `int`. +The `float` type is IEEE 64-bit binary floating point and supports the same arithmetic operators as `int`. ::: code floating_point_numbers.bal ::: diff --git a/examples/integers/integers.md b/examples/integers/integers.md index cc647f8bbd..1ec61ece70 100644 --- a/examples/integers/integers.md +++ b/examples/integers/integers.md @@ -1,6 +1,6 @@ # Integers -The `int` type is 64-bit signed integers (same as `long` in Java) and supports the usual arithmetic operators: `+ - / %`. The operator precedence is same as C. Integer overflow is a runtime error in Ballerina. +The `int` type is 64-bit signed integers and supports the usual arithmetic operators: `+ - / %`. Integer overflow is a runtime error in Ballerina. ::: code integers.bal ::: diff --git a/examples/match-statement/match_statement.md b/examples/match-statement/match_statement.md index a7c1ced88b..0358a835ab 100644 --- a/examples/match-statement/match_statement.md +++ b/examples/match-statement/match_statement.md @@ -1,6 +1,6 @@ # Match statement -`match` statement is similar to `switch` statement in `C` and `JavaScript`. It matches the value, not the type. `==` is used to test whether left hand side matches the value being matched. Left hand side can be a simple literal (`nil`, `boolean`, `int`, `float`, `string`) identifier referring to a constant. +`match` statement is similar to `switch` statement in some other languages. It matches the value, not the type. `==` is used to test whether the left hand side matches the value being matched. The left hand side can be a simple literal (`nil`, `boolean`, `int`, `float`, `string`) identifier referring to a constant. Left hand side of `_` matches if the value is of type `any`. You can use `|` to match more than one value. diff --git a/examples/type-definitions/type_definitions.md b/examples/type-definitions/type_definitions.md index d8d404b631..a0431de8b1 100644 --- a/examples/type-definitions/type_definitions.md +++ b/examples/type-definitions/type_definitions.md @@ -1,6 +1,6 @@ # Type definitions -A type definition gives a name for a type. Its name is just an alias for the type, like `typedef` in C. +A type definition gives a name for a type. The name is just an alias for the type. ::: code type_definitions.bal :::