|Up to Main Lab Page||Next Lesson - Functions||Previous Lesson - Basics|
Maple uses the assignment operator := to assign values to variables.
Note that Maple only updates a line when you press enter, try changing the assignment of a above and pressing enter on both lines in turn.
Once an expression has been defined it acts as an alias for its definition, and
can be used to define further expressions.
NOTE: Using expressions in this way can become confusing, particularly in an interactive session.
Try the following lines:
Maple also allows us to assign variables values which have unassigned variables within them, such an assignment is called an
> a := x^2+3*x+4;
We can then assign a value to the variable
> x := 2;
Notice how Maple gives p and q in symbolic form.
Anything within single quotes (e.g. 'a') is interpreted by Maple as a literal string.
We can unassign an expression by telling Maple to put the variable back to a
> a := 'a';
Maple also has a command 'restart' to restart a session. This command clears
all function and expression definitions.
Clear all the assigned values:
|Up to Main Lab Page||Next Lesson - Functions||Top of this Lesson||Previous Lesson - Basics|