Newby can't get "load" to work.




On Wed, 8 Jun 2011, Charles Russell wrote:

< maxima_userdir;
< "C:/Users/cdr/maxima"
< *************
< load("test.max");
< loadfile: failed to load C:/Users/cdr/maxima/test.max
<  -- an error. To debug this try: debugmode(true);
< *************
< yet the file is really there:
< /home/cdr$ ls C:/Users/cdr/maxima/test.max
< C:/Users/cdr/maxima/test.max
< *************
< here is the file:
< /* test.max - test maxima */
< /* put in maxima_userdir (e.g. cdr/maxima/) and then
< * call with load("test.max"); but not working */
< a:3;
< b:4;
< c:a+b;
< **************

If you rename your file to  test.mac does load work?

< Also, "system" seems to work only on Windows XP, not Windows 7 or Debian, and
< only for the command-line version even on XP, so how do you navigate the file
< system?

Could you send us the output of
build_info();
please.

Could you also explain what you mean by "work". That is, what commands
are you typing in and what are the results. Note that if you are trying
to change the working directory via system, this will not work: system
launches a subshell, executes the system command in that subshell, and
returns. It is like typing

(cd /tmp; pwd)
pwd

on the Linux command line.

The Maxima command

?xchdir("/tmp")

will change the working directory of the Maxima process. That
question mark is not a typo. I put the following in my maxima-init.mac
file

cd(dir) := ?xchdir(dir);


Leo

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