Skip to main content

Right hand side vs. Left hand side

What: Different sides to an operator e.g. = 
Why: Proper treatment of the sides of an operator e.g. = bring much functionality
Time To Complete: 3 hours 

.left and .right

In Free Form Programming Language (ff) the dot operator, namely the dot on your keyboard, allows for accessing parts of an expression!

GivenFor ana given equation e.g. eqeq, in the ff program belowbelow, the lhs or x^2-1+y cabcan be accessed by the expression eq.left and a/b+c by the expression eq.right.

eq = (x^2-1+y == a/b+c);

lhs = eq.left;

show lhs;

rhs = eq.right;

show rhs;

save as lhsrhs

Output

"lhs" → -1 + x^2 + y

"rhs" → a/b + c