Hello,
I try to write fuction that return a list of number in range [a,b] with step
k, but first i try in command window this code:
/* This work in command window without variables */
kill(all);
m:[];
for i:0 step -3 thru 10 do (m:append(m, [i]), display(i));
display(m);
Here is OK, but this below is not OK:
/* This does NOT work in command window with variables */
kill(all);
a:0;
b:10;
k:-3;
m:[];
for i:a step k thru b do (m:append(m, [i]), display(i));
display(m);
/* here is the intresting the output */
(%i7) for i:a step k thru b do (m:append(m, [i]), display(i));
i = 0
i = - 3
i = - 6
....
and so on.
I work in Linux, Debian Lenny i386 with this version of Maxima:
Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) build_info();
Maxima version: 5.13.0
Maxima build date: 22:7 9/5/2008
host type: i686-pc-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7
(%o1)