# Right hand side vs. Left hand side

<p class="callout info"><span style="white-space: pre-wrap;"><b>What</b>: Different sides to an operator e.g. == 
<b>Why</b>: Proper treatment of the sides of an operator e.g. == results in much functionality
<b>Time To Complete</b>: 3 hours </span></p>

<!--
comment
-->
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.en" target="_blank">
<img src="https://wiki.compclassnotes.com/uploads/images/gallery/2026-05/scaled-1680-/cc.png" alt="Alt Text" width="20%" height="20%">

</a>

#### <span style="background-color: rgb(251, 238, 184); white-space: pre-wrap;">.left </span><span style="white-space: pre-wrap;">and </span><span style="background-color: rgb(251, 238, 184);">.right</span>

<span style="color: rgb(0, 0, 0); white-space: pre-wrap;">In Free Form Programming Language (ff) the dot operator, namely the dot on your keyboard, allows for accessing **parts** of an expression!</span>

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">For a given equation e.g. eq, in the ff program below, the lhs or x^2-1+y can be accessed by the expression <span style="background-color: rgb(251, 238, 184);">eq.left</span> and a/b+c by the expression <span style="background-color: rgb(251, 238, 184);">eq.right. </span>

```
eq = (x^2-1+y == a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as sides;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → -1 + x^2 + y 
  <br>
"rhs" → a/b + c
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

<span style="color: rgb(0, 0, 0);white-space: pre-wrap;">The programmer is not required to use a symbol e.g. eq for this . access, as long as using the ( ) operator the results would be the same:</span>

```
tmp = (x^2-1+y == a/b+c).left;

show tmp;

save as lhsrhs;
```


**Output**

   <style>
        .box2 {
            width: 200px;
            height: 50px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box2">
  "tmp" → -1 + x^2 + y 
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

#### ⊕

In Free Form Programming Language (ff), the Symbol ⊕ is one of several unassigned operators.

> <span style="color: rgb(0, 0, 0);">As you can see the . operator works perfectly even if the operator in use is not defined! This is a core language aspect of ff that allows undefined variables as well as undefined functions and undefined operators alike.</span>

```
eq = (x^2-1+y)  ⊕  (a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as sides;
```


**Output**

   <style>
        .box {
            width: 200px;
            height: 90px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → -1 + x^2 + y 
  <br>
"rhs" → a/b + c
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

Try different operators.

```
eq = (x^2-1+y)  <=  (a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as sides;
```

**Output**

   <style>
        .box {
            width: 200px;
            height: 70px;
            background-color:  hsla(89, 43%, 51%, 0.3);
            border: 2px dotted orange;
            padding: 10px;
            margin: 10px;
        }
    </style>

<div class="box">
  "lhs" → -1 + x^2 + y 
  <br>
"rhs" → a/b + c
</div>

<hr style="border: 0; height: 1px; background-color: #ccc;">

<p style= "color: orange;font-size: 10px;"> <b>© 2012-Present CCN Studios</b> </p>

<p style= "color: orange;font-size: 10px">
<b>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 </b>
</p>