Mercurial > octave-antonio
changeset 19128:4990d5988cf5
new function, isstudent (bug #43155)
* utils.cc (Fisstudent): New function.
* system.txi: Include docstring for isstudent.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 21 Sep 2014 14:21:04 -0400 |
parents | df5e4024ec18 |
children | ba1fbfa5cece |
files | doc/interpreter/system.txi libinterp/corefcn/utils.cc |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/system.txi Sun Sep 21 11:05:10 2014 -0700 +++ b/doc/interpreter/system.txi Sun Sep 21 14:21:04 2014 -0400 @@ -515,6 +515,8 @@ @DOCSTRING(isdeployed) +@DOCSTRING(isstudent) + @DOCSTRING(OCTAVE_HOME) @DOCSTRING(matlabroot)
--- a/libinterp/corefcn/utils.cc Sun Sep 21 11:05:10 2014 -0700 +++ b/libinterp/corefcn/utils.cc Sun Sep 21 14:21:04 2014 -0400 @@ -1479,3 +1479,23 @@ stream.width (owidth); stream.fill (ofill); } + +DEFUN (isstudent, args, , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} isstudent ()\n\ +Return true if running in the student edition of Matlab.\n\ +Always return false in Octave.\n\ +\n\ +@seealso{false}\n\ +@end deftypefn") +{ + if (args.length () != 0) + print_usage (); + + return octave_value (false); +} + +/* +%!assert (isstudent (), false); +%!error isstudent (1); +*/