[OctDev] isunix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[OctDev] isunix

William Poetra Yoga H
I think isunix.m can be implemented this way:

## -*- texinfo -*-
## @deftypefn {Function File} {} isunix ()
## Return @sc{true} if Octave is running in a Unix environment.
## @end deftypefn
##
## @seealso{ispc, isstudent, octave_config_info}

function retval = isunix()

  if (nargin > 0)
    usage("isunix ()");
  endif

  retval = octave_config_info("unix");

endfunction

Note the usage of "in a Unix environment": it also returns true if we are
running on Cygwin.

Btw, is my usage of @sc{} appropriate?
Also, can I replace usage(...) above with this?

  help("isunix");
  error("");


William Poetra Yoga Hadisoeseno


               
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: [OctDev] isunix

William Poetra Yoga H
Sorry, I didn't check in Octave cvs first. Please disregard previous message.

William Poetra Yoga Hadisoeseno


       
               
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: [OctDev] isunix

Paul Kienzle-3
In reply to this post by William Poetra Yoga H

On Nov 12, 2005, at 11:34 PM, William Poetra Yoga H wrote:

> Btw, is my usage of @sc{} appropriate?
> Also, can I replace usage(...) above with this?
>
>   help("isunix");
>   error("");

No.  This forces output to the terminal even if you are in
an environment such as try ... catch or eval(code,catch).

- Paul



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev