Name.assign - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Name Class : OpenMaple/Java/Name/assign

Name.assign

assign a value to a Maple name

 

Calling Sequence

Parameters

Description

Examples

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

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/Algebraic

OpenMaple/Java/API

OpenMaple/Java/Name

OpenMaple/Java/Name/isAssigned

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam