view libinterp/op-kw-docs @ 33533:e89b2f30867d bytecode-interpreter tip

maint: Merge default to bytecode-interpreter
author Arun Giridhar <arungiridhar@gmail.com>
date Sun, 05 May 2024 18:12:44 -0400
parents 476a7ecc1f4c
children
line wrap: on
line source

########################################################################
##
## Copyright (C) 1993-2024 The Octave Project Developers
##
## See the file COPYRIGHT.md in the top-level directory of this
## distribution or <https://octave.org/copyright/>.
##
## This file is part of Octave.
##
## Octave is free software: you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## Octave is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Octave; see the file COPYING.  If not, see
## <https://www.gnu.org/licenses/>.
##
########################################################################

!
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} !
Logical 'not' operator.
@seealso{~, not}
@end deftypefn
~
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ~
Logical 'not' operator.

The symbol may also be used to discard outputs of a function that are unwanted
without using a temporary variable.

@example
[~, @var{idx_of_max}] = max (@var{x})
@end example
@seealso{!, not}
@end deftypefn
!=
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} !=
Logical 'not equals' operator.
@seealso{~=, ne}
@end deftypefn
~=
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ~=
Logical 'not equals' operator.
@seealso{!=, ne}
@end deftypefn
"
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} "
String delimiter.

Escape sequences within double-quoted strings are expanded.  I.e., "\n" is a
1-character string representing a newline.  See the single quote delimiter (')
to create strings without escape sequence processing.
@seealso{'}
@end deftypefn
#
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} #
Begin comment character.
@seealso{%, #@\{}
@end deftypefn
%
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} %
Begin comment character.
@seealso{#, %@\{}
@end deftypefn
#{
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} #@{
Begin block comment.

The sequence @code{#@{} must appear alone on a line with no other characters,
other than whitespace, before or after it.  It is possible to nest block
comments.
@seealso{%@\{, #@\}, #}
@end deftypefn
%{
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} %@{
Begin block comment.

The sequence @code{%@{} must appear alone on a line with no other characters,
other than whitespace, before or after it.  It is possible to nest block
comments.
@seealso{#@\{, %@\}, %}
@end deftypefn
#}
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} #@}
Close block comment.

The sequence @code{#@}} must appear alone on a line with no other characters,
other than whitespace, before or after it.  It is possible to nest block
comments.
@seealso{%@\}, #@\{, #}
@end deftypefn
%}
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} %@}
Close block comment.

The sequence @code{%@}} must appear alone on a line with no other characters,
other than whitespace, before or after it.  It is possible to nest block
comments.
@seealso{#@\}, %@\{, %}
@end deftypefn
...
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ...
Continuation marker.

Joins current line with following line before parsing.  This can be used to
improve the human-readability of Octave code, without affecting interpretation.
@end deftypefn
&
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} &
Element-by-element logical 'and' operator.
@seealso{and, &&}
@end deftypefn
&&
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} &&
Logical 'and' operator (with short-circuit evaluation).
@seealso{&}
@end deftypefn
'
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} '
Matrix transpose operator or string delimiter.

For complex matrices, computes the complex conjugate (Hermitian) transpose.

The single quote character may also be used to delimit strings.  Escape
sequences within single-quoted strings are not expanded.  I.e., '\n' is a
2-character string '\' and 'n' rather than "\n" which is a single character
representing a newline.
@seealso{ctranspose, .', "}
@end deftypefn
(
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} (
Array index or function argument delimiter.
@end deftypefn
)
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {})
Array index or function argument delimiter.
@end deftypefn
*
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} *
Multiplication operator.
@seealso{mtimes, .*}
@end deftypefn
**
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} **
Power operator.

This may return complex results for real inputs.  Use @code{realsqrt},
@code{cbrt}, @code{nthroot}, or @code{realpow} to obtain real results when
possible.
@seealso{power, ^, .**, .^, realpow, realsqrt, cbrt, nthroot}
@end deftypefn
^
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ^
Power operator.

This may return complex results for real inputs.  Use @code{realsqrt},
@code{cbrt}, @code{nthroot}, or @code{realpow} to obtain real results when
possible.
@seealso{power, **, .^, .**, realpow, realsqrt, cbrt, nthroot}
@end deftypefn
+
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} +
Addition operator.
@seealso{plus}
@end deftypefn
++
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ++
Increment operator.

Add 1 to existing value of variable.  As in C, may be applied as a prefix
(@code{++x}) or postfix (@code{x++}) operator.
@seealso{--}
@end deftypefn
,
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ,
Array index, function argument, or command separator.
@end deftypefn
-
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} -
Subtraction or unary negation operator.
@seealso{minus}
@end deftypefn
--
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} --
Decrement operator.

Subtract 1 from existing value of variable.  As in C, may be applied as a
prefix (@code{--x}) or postfix (@code{x--}) operator.
@seealso{++}
@end deftypefn
.'
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} .'
Matrix transpose operator.

For complex matrices, computes the transpose, @emph{not} the complex conjugate
(Hermitian) transpose.
@seealso{transpose, '}
@end deftypefn
.*
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} .*
Element-by-element multiplication operator.
@seealso{times, *}
@end deftypefn
.**
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} .**
Element-by-element power operator.

If several complex results are possible, returns the one with smallest
non-negative argument (angle).  Use @code{realpow}, @code{realsqrt},
@code{cbrt}, or @code{nthroot} if a real result is preferred.
@seealso{power, .^, **, ^, realpow, realsqrt, cbrt, nthroot}
@end deftypefn
.^
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} .^
Element-by-element power operator.

If several complex results are possible, returns the one with smallest
non-negative argument (angle).  Use @code{realpow}, @code{realsqrt},
@code{cbrt}, or @code{nthroot} if a real result is preferred.
@seealso{power, .**, ^, **, realpow, realsqrt, cbrt, nthroot}
@end deftypefn
./
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ./
Element-by-element right division operator.
@seealso{rdivide, /, mrdivide, .\\}
@end deftypefn
/
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} /
Right division operator.
@seealso{mrdivide, ./, rdivide, \\}
@end deftypefn
.\
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} .\
Element-by-element left division operator.
@seealso{ldivide, \\, mldivide, ./}
@end deftypefn
\
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} \
Left division operator.

Within double-quoted strings, @samp{\} is the line continuation marker used
to join the current line with the following line.
@seealso{mldivide, .\\, ldivide, /}
@end deftypefn
:
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} :
Select all elements in the specified dimension when indexing.

@example
x(2, :)   # selects 2nd row, all columns
@end example
@end deftypefn
;
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ;
Array row or command separator.
@seealso{,}
@end deftypefn
<
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} <
'Less than' operator.
@seealso{lt}
@end deftypefn
<=
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} <=
'Less than' or 'equals' operator.
@seealso{le}
@end deftypefn
=
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} =
Assignment operator.
@end deftypefn
==
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ==
Equality test operator.
@seealso{eq}
@end deftypefn
>
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} >
'Greater than' operator.
@seealso{gt}
@end deftypefn
>=
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} >=
'Greater than' or 'equals' operator.
@seealso{ge}
@end deftypefn
[
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} [
Return list delimiter.
@seealso{]}
@end deftypefn
]
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ]
Return list delimiter.
@seealso{[}
@end deftypefn
|
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} |
Element-by-element logical 'or' operator.
@seealso{or, ||}
@end deftypefn
||
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} ||
Logical 'or' (with short-circuit evaluation) operator.
@seealso{|}
@end deftypefn
@
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} @@
Return handle to a function.

Example:

@example
@group
f = @@plus;
f (2, 2)
@result{}  4
@end group
@end example

(Note: @@ also finds use in creating classes.  See the manual chapter titled
Object Oriented Programming for a detailed description.)
@seealso{function, functions, func2str, str2func}
@end deftypefn
__FILE__
@c libinterp/parse-tree/lex.ll
-*- texinfo -*-
@deftypefn {} {} __FILE__
When the lexer recognizes the @qcode{"__FILE__"} keyword it returns a
character array containing the full name and path of the file that is being
executed. @qcode{"__FILE__"} will return @code{stdin} if called from the
command line.
@seealso{__LINE__}
@end deftypefn
__LINE__
@c libinterp/parse-tree/lex.ll
-*- texinfo -*-
@deftypefn {} {} __LINE__
When the lexer recognizes the @qcode{"__LINE__"} keyword it returns a numeric
value containing the current input line number of the function or file being
executed.  @qcode{"__LINE__"} will return @code{1} if called from the command
line.
@seealso{__FILE__}
@end deftypefn
break
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} break
Exit the innermost enclosing do, while, or for loop.
@seealso{do, while, for, parfor, continue}
@end deftypefn
case
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn  {} {} case @var{value}
@deftypefnx {} {} case @{@var{value}, @dots{}@}
A case statement in a switch block.

Octave cases are exclusive and do not fall-through as do C-language cases.  A
switch statement must have at least one case.  See @code{switch} for an
example.
@seealso{switch}
@end deftypefn
catch
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn  {} {} catch
@deftypefnx {} {} catch @var{value}
Begin the cleanup part of a try-catch block.
@seealso{try}
@end deftypefn
classdef
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} classdef
Begin a classdef block.
@seealso{properties, methods, events, enumeration}
@end deftypefn
continue
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} continue
Jump to the end of the innermost enclosing do, while, or for loop.
@seealso{break, do, while, for, parfor}
@end deftypefn
do
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} do
Begin a do-until loop.

This differs from a while loop in that the body of the loop is executed at
least once.

@example
@group
i = 0;
do
  i++
until (i == 10)
@end group
@end example
@seealso{for, until, while}
@end deftypefn
else
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} else
Alternate action for an if block.

See @code{if} for an example.
@seealso{if}
@end deftypefn
elseif
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} elseif (@var{cond})
Alternate conditional test for an if block.

The conditional @var{cond} is true if it is not empty and if @emph{all} values
are nonzero.

See @code{if} for an example.
@seealso{if}
@end deftypefn
end_try_catch
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} end_try_catch
Mark the end of a @code{try-catch} block.
@seealso{try, catch}
@end deftypefn
end_unwind_protect
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} end_unwind_protect
Mark the end of an unwind_protect block.
@seealso{unwind_protect}
@end deftypefn
endclassdef
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endclassdef
Mark the end of a classdef definition.
@seealso{classdef}
@end deftypefn
endenumeration
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endenumeration
Mark the end of an enumeration block in a classdef definition.
@seealso{enumeration}
@end deftypefn
endevents
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endevents
Mark the end of an events block in a classdef definition.
@seealso{events}
@end deftypefn
endfor
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endfor
Mark the end of a for loop.

See @code{for} for an example.
@seealso{for}
@end deftypefn
endfunction
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endfunction
Mark the end of a function.
@seealso{function}
@end deftypefn
endif
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endif
Mark the end of an if block.

See @code{if} for an example.
@seealso{if}
@end deftypefn
endmethods
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endmethods
Mark the end of a methods block in a classdef definition.
@seealso{methods}
@end deftypefn
endparfor
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endparfor
Mark the end of a parfor loop.

See @code{parfor} for an example.
@seealso{parfor}
@end deftypefn
endproperties
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endproperties
Mark the end of a properties block in a classdef definition.
@seealso{properties}
@end deftypefn
endspmd
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endparfor
Mark the end of an spmd block.  See @code{spmd} for an example.
@seealso{spmd, parfor}
@end deftypefn
endswitch
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endswitch
Mark the end of a switch block.

See @code{switch} for an example.
@seealso{switch}
@end deftypefn
endwhile
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} endwhile
Mark the end of a while loop.

See @code{while} for an example.
@seealso{do, while}
@end deftypefn
enumeration
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} enumeration
Begin an enumeration block in a classdef definition.
@end deftypefn
events
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} events
Begin an events block in a classdef definition.
@end deftypefn
for
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} for @var{i} = @var{range}
Begin a for loop.

@example
@group
for i = 1:10
  i
endfor
@end group
@end example
@seealso{parfor, do, while}
@end deftypefn
function
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn  {} {} function @var{outputs} = function_name (@var{input}, @dots{})
@deftypefnx {} {} function {} function_name (@var{input}, @dots{})
@deftypefnx {} {} function @var{outputs} = function_name
Begin a function body with name @code{function_name}, with @var{outputs} as
results, and with @var{inputs} as parameters.

The function can later be invoked in Octave using the syntax

@example
[@var{output1}, @var{output2}, @dots{}] = function_name (@var{input1}, @var{input2}, @dots{})
@end example

@seealso{return}
@end deftypefn
global
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} global @var{var}
Declare variables to have global scope.

@example
@group
global @var{x};
if (isempty (@var{x}))
  x = 1;
endif
@end group
@end example
@seealso{persistent}
@end deftypefn
if
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn  {} {} if (@var{cond}) @dots{} endif
@deftypefnx {} {} if (@var{cond}) @dots{} else @dots{} endif
@deftypefnx {} {} if (@var{cond}) @dots{} elseif (@var{cond}) @dots{} endif
@deftypefnx {} {} if (@var{cond}) @dots{} elseif (@var{cond}) @dots{} else @dots{} endif
Begin an if block.

The conditional @var{cond} is true if it is not empty and if @emph{all} values
are nonzero.

@example
@group
x = 1;
if (x == 1)
  disp ("one");
elseif (x == 2)
  disp ("two");
else
  disp ("not one or two");
endif
@end group
@end example
@seealso{switch}
@end deftypefn
@c ## FIXME: Can't have duplicate DOCSTRING entries.  The function methods()
@c ##        already has a docstring which overrides this keyword definition.
@c ##        If this is fixed, place \x1d char before keyword "methods".
@c ## methods
@c ## @c libinterp/parse-tree/oct-parse.yy
@c ## -*- texinfo -*-
@c ## @deftypefn {} {} methods
@c ## Begin a methods block in a classdef definition.
@c ## @end deftypefn
otherwise
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} otherwise
The default statement in a switch block which is executed when no other
case statements match the input.
@seealso{switch, case}
@end deftypefn
parfor
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn  {} {} parfor @var{i} = @var{range}
@deftypefnx {} {} parfor (@var{i} = @var{range}, @var{maxproc})
Begin a for loop that may execute in parallel.

A @code{parfor} loop has the same syntax as a @code{for} loop.  If your Octave
session has a parallel processing pool enabled, the iterations of the
@code{parfor} loop will be executed in parallel across the pool's workers.
Otherwise, @code{parfor} will behave exactly as @code{for}.

When operating in parallel mode, a @code{parfor} loop's iterations are not
guaranteed to occur sequentially, and there are additional restrictions about
the data access operations you can do inside the loop body.

@strong{Warning:} parallel processing pools are currently unimplemented in
Octave; @code{parfor} currently behaves exactly as a normal @code{for} loop.

@example
@group
parfor i = 1:10
  i
endparfor
@end group
@end example
@seealso{for, do, while}
@end deftypefn
persistent
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} persistent @var{var}
Declare variables as persistent.

A variable that has been declared persistent within a function will retain its
contents in memory between subsequent calls to the same function.  The
difference between persistent variables and global variables is that persistent
variables are local in scope to a particular function and are not visible
elsewhere.
@seealso{global}
@end deftypefn
@c ## FIXME: Can't have duplicate DOCSTRING entries.  The function properties()
@c ##        already has a docstring which overrides this keyword definition.
@c ##        If this is fixed, place \x1d char before keyword "properties".
@c ## properties
@c ## @c libinterp/parse-tree/oct-parse.yy
@c ## -*- texinfo -*-
@c ## @deftypefn {} {} properties
@c ## Begin a properties block in a classdef definition.
@c ## @end deftypefn
return
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} return
Return execution control immediately from a function or script to the calling
code.

@code{return} is used to stop executing code and exit an m-file immediately
rather than continuing until the end of the function or script is reached.

If the function or script was invoked directly, rather than from calling code
in an m-file, then Octave returns to the command line.
@seealso{function}
@end deftypefn
spmd
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn  {} {} spmd
@deftypefnx {} {} spmd (@var{n})
@deftypefnx {} {} spmd (@var{m}, @var{n})
Begin a block of statements which may execute in parallel across multiple
workers.

If Octave has a parallel processing pool enabled, the block of code will be
executed in parallel across all of the pool's workers.  Otherwise, @code{spmd}
has no effect and the statements are processed as normal code by the main
Octave interpreter.

If called with one additional argument @var{n} then use exactly @var{n} workers
from the pool.  If called with two arguments @var{m}, @var{n} then use a
minimum of @var{m} workers and a maximum of @var{n} workers from the parallel
pool.

@strong{Warning:} parallel processing pools are currently unimplemented in
Octave; @code{spmd} currently does nothing, but is included to avoid breaking
existing @sc{matlab} code.

@seealso{parfor}
@end deftypefn
switch
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} switch @var{statement}
Begin a switch block.

@example
@group
yesno = "yes";

switch (yesno)
  case @{"Yes" "yes" "YES" "y" "Y"@}
    value = 1;
  case @{"No" "no" "NO" "n" "N"@}
    value = 0;
  otherwise
    error ("invalid value");
endswitch
@end group
@end example
@seealso{if, case, otherwise}
@end deftypefn
try
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} try
Begin a try-catch block.

If an error occurs within a try block, then the catch code will be run and
execution will proceed after the catch block (though it is often recommended to
use the @code{lasterr} function to re-throw the error after cleanup is
completed).
@seealso{catch, unwind_protect}
@end deftypefn
until
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} until (@var{cond})
End a do-until loop.

The conditional @var{cond} is true if it is not empty and if @emph{all} values
are nonzero.

See @code{do} for an example.
@seealso{do}
@end deftypefn
unwind_protect
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} unwind_protect
Begin an unwind_protect block.

If an error occurs within the first part of an unwind_protect block the
commands within the unwind_protect_cleanup block are executed before the error
is thrown.  If an error is not thrown, then the unwind_protect_cleanup block is
still executed.  In other words, the unwind_protect_cleanup code is guaranteed
to execute regardless of success or failure in the unwind_protect block.
@seealso{unwind_protect_cleanup, try}
@end deftypefn
unwind_protect_cleanup
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} unwind_protect_cleanup
Begin the cleanup section of an unwind_protect block.
@seealso{unwind_protect}
@end deftypefn
varargin
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} varargin
Pass an arbitrary number of arguments into a function.
@seealso{varargout, nargin, isargout, nargout, nthargout}
@end deftypefn
varargout
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} varargout
Pass an arbitrary number of arguments out of a function.
@seealso{varargin, nargin, isargout, nargout, nthargout}
@end deftypefn
while
@c libinterp/parse-tree/oct-parse.yy
-*- texinfo -*-
@deftypefn {} {} while (@var{cond})
Begin a while loop.

The conditional @var{cond} is true if it is not empty and if @emph{all} values
are nonzero.

@example
@group
i = 0;
while (i < 10)
  i++
endwhile
@end group
@end example
@seealso{do, endwhile, for, until}
@end deftypefn