Re: [q-lang-users] First Q
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2007-07-05 09:23:46
|
Abram wrote: > ==> square X = X * X; The interpreter only accepts expressions to evaluate. So '=' will be interpreted as the equality operator here (which isn't by default defined on symbolic expressions, hence the expression 'square X=X*X' is in normal form). To enter a script with definitions, you must save it to a file and load it with the interpreter (similar to Hugs or ghci). For instance: ==> edit square.q <<enter the script in vi and save it>> ==> run square.q ==> square 3 9 Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |