diff --git a/examples/index.json b/examples/index.json index 8678571921..39d66c4107 100644 --- a/examples/index.json +++ b/examples/index.json @@ -131,13 +131,6 @@ "verifyBuild": true, "verifyOutput": true, "isLearnByExample": true - }, - { - "name": "Unary operators", - "url": "unary-operators", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true } ] }, diff --git a/examples/unary-operators/unary_operators.bal b/examples/unary-operators/unary_operators.bal deleted file mode 100644 index 8457a1de24..0000000000 --- a/examples/unary-operators/unary_operators.bal +++ /dev/null @@ -1,20 +0,0 @@ -import ballerina/io; - -public function main() { - int a = 10; - - // Negates the value - io:println(-a); - // Bitwise NOT - io:println(~a); - - float b = 10.5; - - // Negates the value - io:println(-b); - - boolean c = true; - - // Logical NOT - io:println(!c); -} diff --git a/examples/unary-operators/unary_operators.md b/examples/unary-operators/unary_operators.md deleted file mode 100644 index 9a25f1dd77..0000000000 --- a/examples/unary-operators/unary_operators.md +++ /dev/null @@ -1,7 +0,0 @@ -# Unary operators - -Ballerina supports unary operators that perform operations on a single operand. The unary negation operator (-) negates the value of a numeric type, effectively changing its sign. The bitwise NOT operator (~) inverts the bits of an integer, converting each 0 to 1 and each 1 to 0. For boolean values, the logical NOT operator (!) inverts the boolean value, changing true to false and vice versa. These unary operators provide essential functionality for manipulating individual values efficiently. - -::: code unary_operatos.bal ::: - -::: out unary_operatos.out ::: diff --git a/examples/unary-operators/unary_operators.metatags b/examples/unary-operators/unary_operators.metatags deleted file mode 100644 index 9ec8c925ef..0000000000 --- a/examples/unary-operators/unary_operators.metatags +++ /dev/null @@ -1,2 +0,0 @@ -description: This BBE introduces the unary operators associated with ballerina types. -keywords: ballerina, ballerina by example, bbe, operators, unary operators, bitwise operators, int, float, boolean, -, ~, ! diff --git a/examples/unary-operators/unary_operators.out b/examples/unary-operators/unary_operators.out deleted file mode 100644 index f5c83b71e3..0000000000 --- a/examples/unary-operators/unary_operators.out +++ /dev/null @@ -1,5 +0,0 @@ -$ bal run unary_operators.bal --10 --11 --10.5 -false