DOCUMENTATION CENTER SEARCH
Mathematica
>
Flow Control
>
Built-in
Mathematica
Symbol
Loops and Control Structures
Tutorials »
|
Break
Throw
Abort
DialogReturn
See Also »
|
Flow Control
Looping Constructs
Procedural Programming
More About »
Return
Return
[
expr
]
returns the value
expr
from a function.
Return
[]
returns the value
Null
.
MORE INFORMATION
Return
[
expr
]
exits control structures within the definition of a function, and gives the value
expr
for the whole function.
Return
takes effect as soon as it is evaluated, even if it appears inside other functions.
Return
can be used inside functions like
Scan
.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
Return from a function:
In[1]:=
In[2]:=
Out[2]=
Possible Issues
(1)
SEE ALSO
Break
Throw
Abort
DialogReturn
TUTORIALS
Loops and Control Structures
MORE ABOUT
Flow Control
Looping Constructs
Procedural Programming
New in 1
© 2008 Wolfram Research, Inc.