[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave on Windows
From: |
Michael Goffioul |
Subject: |
Re: Octave on Windows |
Date: |
Mon, 30 Jun 2008 15:17:38 +0200 |
On Mon, Jun 30, 2008 at 3:08 PM, <address@hidden> wrote:
> On my Windows XP system it produces "ans = 0" which is not particularly
> enlightening. There is no .octavrc at %USERPROFILE% but I have one at
> "C:\Program Files\Octave" (empty). The one I use is called octaverc (no
> period) and is located at C:\Program
> Files\Octave\share\octave\site\m\startup
If you look at "system" documentation (type "help system"), you'll
learn that the "system" command returns the exit code of the
child process (in this case "touch"). An error code of 0 usually
means "no error" in computing world.
When you type system("touch .octaverc"), what you actually do
is executing the command "touch" as a child process (again read
"system" documentation). This command is executed in an
environment inherited from the parent process, in this case it
means octave. So, the child process will be executed with the
same current directory as octave (you can look at the current
directory with "pwd" in octave). As you didn't specify a full
pathname in the "touch" command, the file .octaverc will be
created in the current directory. That's why you get an empty
.octaverc in the octave installation directory.
Michael.
Re: Octave on Windows, Michael Grossbach, 2008/06/29
Re: Octave on Windows, Michael Goffioul, 2008/06/30