help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fopen: default open mode is now binary?


From: Vic Norton
Subject: Re: fopen: default open mode is now binary?
Date: Thu, 7 Apr 2005 10:46:20 -0400

Thanks for the "wt" advice, Avraha. I worked perfectly. I guess I didn't read "help fopen" closely enough.

As far as I know the forward slash means the same thing in both the Linux and Mac systems. "Output/portfolioValues.csv" just points to a specific file in the "Output" directory.

At the beginning of my script, "portfolioValues.m", I execute another script, "spdrData.m", which contains the path to an "Octave" directory in the variable "octaveDir". Then I do
   chdir(octaveDir);
Now "Output/portfolioValues.csv" points to "/.../Octave/Output/portfolioValues.csv".
In fact my octave script is actually "/.../Octave/m/portfolioValues.m".

I hope this explains it.

Regards,

Vic

At 4:51 PM +0300 4/7/05, address@hidden wrote:
 Hi
If you write explicitely fid = fopen(file, "wt"), instead of just
fid = fopen(file, "w"); you won't get any warning.
But I am surprised that octave accepted the argument
file = "Output/portfolioValues.csv"
On my system, the succession of commands:
file = "Output/portfolioValues.csv";
fid = fopen(file, "w")
 gave the output: fid = -1; i.e. no file was opened. Only when I
 left out the Output/ part did it behave correctly

 I guess this is due to the fact that you use Mac OS while I am
 using linux: The meaning and treatment of the forward slash is
 apparently different.
 Cheers, Avraha


--
*------* http://www.ridehsta.com
|  Vic Norton           2005 R1200GS  HSTA 5992  DOD 43403
|  Bowling Green, OH    1997 KLR650   STOC 037   AMA 594102
*------* http://vic.norton.name/moto



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]