From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 10 13:49:20 2003 Subject: Re: How to detect terminal type? From: Andy Adler To: Peter Brinkmann cc: help-octave at bevo dot che dot wisc dot edu Date: Fri, 10 Jan 2003 14:48:40 -0500 (EST) On Fri, 10 Jan 2003, Peter Brinkmann wrote: > So, my new question is, what's the best way to detect whether my code is > running under *nix or Windows? I guess I could look at the result of > computer(), but I don't know what kind of result it returns when running > under Windows. Can I detect Windows by checking whether > findstr(computer(),'windows') > returns a nonzero value, or how should I go about this? my definition of windows is: ~isempty( findstr(computer(),'cygwin') ) Currently, I believe all octave for windows runs on top of cygwin, so this is reliable. However, if Paul Kienzle ever finishes his octave on mingw project, then that way change ... andy ------------------------------------------------------------- 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 -------------------------------------------------------------