import com.maplesoft.openmaple.*;
|
import com.maplesoft.externalcall.MapleException;
|
class Example
|
{
|
public static void main( String notused[] ) throws MapleException
|
{
|
String mapleArgs[];
|
Engine engine;
|
List original, unique, global;
|
mapleArgs = new String[1];
|
mapleArgs[0] = "java";
|
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
|
null, null );
|
global = (List)engine.evaluate( "[100]:" );
|
original = engine.newList( 1 );
|
original.assign( 1, engine.newNumeric( 100 ) );
|
unique = (List)original.unique();
|
if ( !original.dagEquals( unique ) )
|
{
|
System.out.println( "unique not equal to original" );
|
}
|
if ( !original.dagEquals( global ) )
|
{
|
System.out.println( "global not equal to original" );
|
}
|
if ( unique.dagEquals( global ) )
|
{
|
System.out.println( "unique and global are equal" );
|
}
|
}
|
}
|