assign - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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 = { "java" };

        Engine engine = new Engine( mapleArgs, new EngineCallBacksDefault(), null, null );

        Name name = (Name)engine.evaluate( "abcde:" );

        System.out.println( name );

        Algebraic 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