Name.assign - assign a value to a Maple name
|
Calling Sequence
|
|
void assign( Algebraic val ) throws MapleException
|
|
Parameters
|
|
val
|
-
|
value to assign to the list
|
|
|
|
|
Description
|
|
•
|
The assign function assigns the Name object the value val.
|
•
|
Any existing value assigned to the Name is discarded.
|
|
|
Examples
|
|
import com.maplesoft.openmaple.*;
|
import com.maplesoft.externalcall.MapleException;
|
class Example
|
{
|
public static void main( String notused[] ) throws MapleException
|
{
|
String mapleArgs[];
|
Engine engine;
|
Name name;
|
Algebraic e;
|
mapleArgs = new String[1];
|
mapleArgs[0] = "java";
|
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
|
null, null );
|
name = (Name)engine.evaluate( "abcde:" );
|
System.out.println( name );
|
e = engine.evaluate( "expand( (x+y)^5 ):" );
|
name.assign( e );
|
e = engine.evaluate( "abcde:" );
|
System.out.println( e );
|
}
|
}
|
|
|
Executing this code produces the following output.
abcde
|
x^5+5*x^4*y+10*x^3*y^2+10*x^2*y^3+5*x*y^4+y^5
|
|
|
|
|
Download Help Document
Was this information helpful?