6 Sep 04:50
compiling and undefined variables
From: John Lapeyre <pdl <at> johnlapeyre.com>
Subject: compiling and undefined variables
Newsgroups: gmane.comp.mathematics.maxima.general
Date: 2008-09-06 02:52:51 GMT
Subject: compiling and undefined variables
Newsgroups: gmane.comp.mathematics.maxima.general
Date: 2008-09-06 02:52:51 GMT
Here I compile two functions
(the source is given below)
(%i2) compile(integerdigits,fromdigits);
Warning-> block is an undefined global variable.
Warning-> m is an undefined global variable.
Warning-> diff is an undefined global variable.
Warning-> b is an undefined global variable.
Warning-> r is an undefined global variable.
Warning-> pad is an undefined global variable.
Warning-> i is an undefined global variable.
Warning-> s is an undefined global variable.
I wonder why these warnings appear ?
The functions still seem to work, but I haven't
tested them thoroughly.
------code
/*
integerdigit(n) returns list of digits in integer n
integerdigits(n,b) returned digits are in base b
integerdigits(n,b,pad) leading zeros appended so list
is of total length pad.
for base greater than 10, additional digits are denoted in decimal,
not using A,B, etc.
*/
integerdigits(n,[ib]) := (block[m,r:[],b:10,pad:0,diff],
n : abs(n),
(Continue reading)
RSS Feed