Skip to content

Commit

Permalink
Remove comparisons with other languages
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryamZi committed Sep 20, 2024
1 parent 38c7c14 commit 6939958
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/boolean/boolean.md
Original file line number Diff line number Diff line change
@@ -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 :::

Expand Down
2 changes: 1 addition & 1 deletion examples/floating-point-numbers/floating_point_numbers.md
Original file line number Diff line number Diff line change
@@ -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 :::

Expand Down
2 changes: 1 addition & 1 deletion examples/integers/integers.md
Original file line number Diff line number Diff line change
@@ -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 :::

Expand Down
2 changes: 1 addition & 1 deletion examples/match-statement/match_statement.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion examples/type-definitions/type_definitions.md
Original file line number Diff line number Diff line change
@@ -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 :::

Expand Down

0 comments on commit 6939958

Please sign in to comment.