Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
Documentation Center
Search

Set

lhs = rhs evaluates rhs and assigns the result to be the value of lhs. From then on, lhs is replaced by rhs whenever it appears.
{ ,  , ... } = { ,  , ... } evaluates the  and assigns the results to be the values of the corresponding  .

• New assignments with identical lhs overwrite old ones.
• You can see all the assignments associated with a symbol lhs by evaluating ?lhs or by clicking  on the
Calculation controller.
lhs = rhs returns rhs even if for some reason the assignment specified cannot be performed.
• See also: Clear, SetDelayed.

Examples

Using InstantCalculators

Here are the InstantCalculators for the Set function. Enter the parameters for your calculation and click Define to see the result.

Entering Commands Directly

You can paste a template for this command via the Text Input button on the Set Function Controller.

Set the variable a to 3.

The variable can be used in calculations.

This is understood as a new variable. It is not interpreted as multiplication of a and b.

To multiply a and b, insert a space.

Variable names can be strings of characters such as expr. Their values can be math expressions or numerical values.

Clear the variable definitions.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: