Maxima Function
length (expr)
Returns (by default) the number of parts in the external (displayed) form of expr. For lists this is the number of elements, for matrices it is the number of rows, and for sums it is the number of terms (see ).
The length command is affected by the
inflag switch. So, e.g. length(a/(b*c)); gives 2 if
inflag is false (Assuming exptdispflag is true), but 3 if inflag is
true (the internal representation is essentially a*b^-1*c^-1).