~ubuntu-branches/ubuntu/wily/octave/wily-proposed

« back to all changes in this revision

Viewing changes to libinterp/octave-value/ov-usr-fcn.cc

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2014-03-10 17:32:29 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20140310173229-000oj77i9m6tjpvd
Tags: 3.8.1-1
* Imported Upstream version 3.8.1
  + libgui/src/main-window.cc: Fix problems with gui startup and focus issues
    (Closes: #738672)
  + scripts/pkg/private/fix_depends.m: Fix installing packages where
    dependency name contains '-' (Closes: #740984)
* debian/copyright: reflect upstream changes.
* octave.postinst: remove workaround for #681064 (package dir re-creation).
  (Closes: #681461)
* Remove patches applied upstream:
  + doc-compressed-info.diff
  + kfreebsd_tcgetattr.diff
  + octave-cli-manpage.diff
  + save-uint8-in-text-format.diff
* mkoctfile is now an executable binary instead of a shell script.
  + mkoctfile-mpi.diff: adapt for new format of mkoctfile.
  + d/control: add shlibs:Depends to liboctave-dev.
* Fix statement about the GUI in NEWS.Debian.
* debian/control: don't mention the FAQ in descriptions, it has been removed.
* Adapt to the fact that JIT is now disabled by default in ./configure script.
* Disable JIT on hurd-i386, LLVM not available there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
794
794
At the top level, return the number of command line arguments passed to\n\
795
795
Octave.\n\
796
796
\n\
797
 
If called with the optional argument @var{fcn}, a function name or handle,\n\
 
797
If called with the optional argument @var{fcn}---a function name or handle---\n\
798
798
return the declared number of arguments that the function can accept.\n\
799
 
If the last argument is @var{varargin} the returned value is negative.\n\
800
 
This feature does not work on builtin functions.\n\
 
799
\n\
 
800
If the last argument to @var{fcn} is @var{varargin} the returned value is\n\
 
801
negative.  For example, the function @code{union} for sets is declared as\n\
 
802
\n\
 
803
@example\n\
 
804
@group\n\
 
805
function [y, ia, ib] = union (a, b, varargin)\n\
 
806
\n\
 
807
and\n\
 
808
\n\
 
809
nargin (\"union\")\n\
 
810
@result{} -3\n\
 
811
@end group\n\
 
812
@end example\n\
 
813
\n\
 
814
Programming Note: @code{nargin} does not work on built-in functions.\n\
801
815
@seealso{nargout, varargin, isargout, varargout, nthargout}\n\
802
816
@end deftypefn")
803
817
{
858
872
@deftypefn  {Built-in Function} {} nargout ()\n\
859
873
@deftypefnx {Built-in Function} {} nargout (@var{fcn})\n\
860
874
Within a function, return the number of values the caller expects to\n\
861
 
receive.  If called with the optional argument @var{fcn}, a function\n\
862
 
name or handle, return the number of declared output values that the\n\
 
875
receive.  If called with the optional argument @var{fcn}---a function\n\
 
876
name or handle---return the number of declared output values that the\n\
863
877
function can produce.  If the final output argument is @var{varargout}\n\
864
878
the returned value is negative.\n\
865
879
\n\
877
891
@end example\n\
878
892
\n\
879
893
@noindent\n\
880
 
will cause @code{nargout} to return 2 inside the function\n\
881
 
@code{f}.\n\
 
894
will cause @code{nargout} to return 2 inside the function @code{f}.\n\
882
895
\n\
883
896
In the second usage,\n\
884
897
\n\
890
903
will return 2, because @code{histc} has two outputs, whereas\n\
891
904
\n\
892
905
@example\n\
893
 
nargout (@@deal)\n\
 
906
nargout (@@imread)\n\
894
907
@end example\n\
895
908
\n\
896
909
@noindent\n\
897
 
will return -1, because @code{deal} has a variable number of outputs.\n\
 
910
will return -2, because @code{imread} has two outputs and the second is\n\
 
911
@var{varargout}.\n\
898
912
\n\
899
 
At the top level, @code{nargout} with no argument is undefined.\n\
900
 
@code{nargout} does not work on builtin functions.\n\
901
 
@code{nargout} returns -1 for all anonymous functions.\n\
 
913
At the top level, @code{nargout} with no argument is undefined and will\n\
 
914
produce an error.  @code{nargout} does not work for built-in functions and\n\
 
915
returns -1 for all anonymous functions.\n\
902
916
@seealso{nargin, varargin, isargout, varargout, nthargout}\n\
903
917
@end deftypefn")
904
918
{
986
1000
@deftypefnx {Built-in Function} {@var{old_val} =} optimize_subsasgn_calls (@var{new_val})\n\
987
1001
@deftypefnx {Built-in Function} {} optimize_subsasgn_calls (@var{new_val}, \"local\")\n\
988
1002
Query or set the internal flag for subsasgn method call optimizations.\n\
 
1003
\n\
989
1004
If true, Octave will attempt to eliminate the redundant copying when calling\n\
990
 
subsasgn method of a user-defined class.\n\
 
1005
the subsasgn method of a user-defined class.\n\
991
1006
\n\
992
1007
When called from inside a function with the @qcode{\"local\"} option, the\n\
993
1008
variable is changed locally for the function and any subroutines it calls.  \n\
1021
1036
       "-*- texinfo -*-\n\
1022
1037
@deftypefn {Built-in Function} {} isargout (@var{k})\n\
1023
1038
Within a function, return a logical value indicating whether the argument\n\
1024
 
@var{k} will be assigned on output to a variable.  If the result is false,\n\
 
1039
@var{k} will be assigned to a variable on output.  If the result is false,\n\
1025
1040
the argument has been ignored during the function call through the use of\n\
1026
1041
the tilde (~) special output argument.  Functions can use @code{isargout} to\n\
1027
1042
avoid performing unnecessary calculations for outputs which are unwanted.\n\