what is the difference between :, =, and :=




On Tue, 12 Apr 2011, Ether Jones wrote:

< 
< Can someone recommend a lucid document that explains what the difference is between ":", "=", and ":=" in Maxima, and under what circumstances each one should be used?
 
 : is the assignment operator, so you would write

 x:1;

 to store 1 in the variable x.

 := is the operator to define a function, so you would write

 f(x) := ....;

 to define a function f of one variable.

 = creates an equation, and it is used to test 
 syntactic equality, so you would write

 solve(sin(x)=0,x);

 to find the zeros of sin(x) or

 is(a=b);

 to test if the expressions a and b are syntactically equal.
 (These two roles are somewhat inconsistent.)

 You can find help on X in Maxima by typing:

 ? X

 or

 ?? X

 Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.