|
From: Ethan A M. <merritt@u.washington.edu> - 2006-03-05 00:23:08
|
On Saturday 04 March 2006 02:13 pm, Petr Mikulik wrote:
> > Here's another. The new function does not recognize pipes
>
> The routine fileexist() is for files only; it makes no sense for pipes.
> For pipes, do
> if (fileexist('a.dat')) plot '<tr . , a.dat'
Sure. But that is only possible if you already know whether it is a
pipe or not. What about the case where you want to put the
fileexist() test in a loadable routine that is passed the filename
string as a parameter? I tried to show a plausible use for such
a thing in the previous mail. At the time you are writing the
loadable routine, you don't know whether the caller will pass you
a file or a pipe at some future time.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|