lhospitallim SciMax Toolbox li

SciMax Toolbox >> Lhs

Lhs

Scilab equivalent of the Maxima Function lhs

Calling Sequence

lhs (expr)

Description

Returns the left-hand side (that is, the first argument) of the expression expr, when the operator of expr is one of the relational operators < <= = # equal notequal >= >,

one of the assignment operators := ::= : ::, or a user-defined binary infix operator, as declared by infix.

When expr is an atom or its operator is something other than the ones listed above, lhs returns expr.

See also .

Examples:

(%i1) e: aa + bb = cc;
(%o1)                     bb + aa = cc
(%i2) lhs (e);
(%o2)                        bb + aa
(%i3) rhs (e);
(%o3)                          cc
(%i4) [lhs (aa < bb), lhs (aa <= bb), lhs (aa >= bb),
       lhs (aa > bb)];
(%o4)                   [aa, aa, aa, aa]
(%i5) [lhs (aa = bb), lhs (aa # bb), lhs (equal (aa, bb)),
       lhs (notequal (aa, bb))];
(%o5)                   [aa, aa, aa, aa]
(%i6) e1: '(foo(x) := 2*x);
(%o6)                     foo(x) := 2 x
(%i7) e2: '(bar(y) ::= 3*y);
(%o7)                    bar(y) ::= 3 y
(%i8) e3: '(x : y);
(%o8)                         x : y
(%i9) e4: '(x :: y);
(%o9)                        x :: y
(%i10) [lhs (e1), lhs (e2), lhs (e3), lhs (e4)];
(%o10)               [foo(x), bar(y), x, x]
(%i11) infix ("][");
(%o11)                         ][
(%i12) lhs (aa ][ bb);
(%o12)                         aa
lhospitallim SciMax Toolbox li