MString.stringValue - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : MString Class : OpenMaple/Java/MString/stringValue

MString.stringValue

returns the string represented by the MString

 

Calling Sequence

Description

Examples

Calling Sequence

String stringValue() throws MapleException

Description

• 

The stringValue function returns the value represented in the MString as a Java String.  This differs from the toString command because it returns the string represented in the Algebraic, not a string that can be evaluated to re-create the Maple string.

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 );

        MString str = (MString)engine.newMString( "abcde" );

        System.out.println( str );

        String sv = str.stringValue();

        System.out.println( sv );

    }

}

Executing this code produces the following output.

"abcde"

abcde

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/API

OpenMaple/Java/MString