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

Online Help

All Products    Maple    MapleSim


Maplets[Elements]

  

Argument

  

specify an argument for an Evaluate element

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Argument(opts)

Parameters

opts

-

equation(s) of the form source=value; specify options for the Argument element

Description

• 

The Argument element specifies the argument of a Maple function call.

• 

The Argument element features can be modified by using options. To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.

Elements, Symbols, or Types

Assumed Option or Content

 

 

name or string

source option

 

 

• 

An Argument element cannot contain other elements.

• 

An Argument element can be contained in an Evaluate or SetOption element.

• 

The following table describes the control and use of the Argument element options.

  

An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).

  

An x in the R column indicates that the option is required in the calling sequence.

  

An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.

  

An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.

Option

I

R

G

S

 

 

 

 

 

source*

x

 

 

 

quotedtext

x

 

 

 

value*

x

 

 

 

 

 

 

 

 

  

*Note that the source and value options are mutually exclusive (see below).

• 

The opts argument can contain one or more of the following equations that set Maplet application options.

  

 

  

source = reference to an element (name or string)

  

A name or string referring to another element in the Maplet application. This option cannot be used in combination with value.

  

 

  

quotedtext = indicates if argument is a text argument (for example, the contents of a TextField)

  

By default, the value of this is false, in which case the argument must be a valid mathematical expression or value. When set to true, the argument is passed as a string.

  

 

  

value = reference to a fixed value, to be passed as is

  

An arbitrary Maple object, to be passed as the specified argument to the Evaluate procedure. Note that this option can only be used with certain forms of Evaluate and cannot be used with SetOption. This option cannot be used in combination with source.

Examples

f := proc(a)
   int(a, x);
end proc:

withMapletsElements:

mapletMapletTextFieldTF1,ButtonB1Integrate w.r.t. x,Evaluatetarget=TF1,function=f,ArgumentTF1,ButtonB2OK,ShutdownTF1:

MapletsDisplaymaplet

This Maplet application can also be written as:

mapletMapletTextFieldTF1,ButtonB1Integrate w.r.t. x,EvaluateTF1=fTF1,ButtonB2OK,ShutdownTF1:

MapletsDisplaymaplet

The expression fTF1 must be placed in unevaluation quotes. Otherwise, the function fTF1 evaluates to TF1x.

The same example, but using Argument with 'value':

mapletMapletTextFieldTF1,ButtonB1Integrate w.r.t. x,Evaluatetarget=TF1,function=diff,ArgumentTF1,Argumentvalue=x,ButtonB2OK,ShutdownTF1:

MapletsDisplaymaplet

The following Maplet application counts the number of characters in a string input:

mapletMapletTextFieldTF1This is a test,TextFieldTF2,editable=false,ButtonB1Count,onclick=Evaluatetarget=TF2,function=length,ArgumentTF1,quotedtext=true,ButtonB2OK,ShutdownTF2:

MapletsDisplaymaplet

See Also

int

Maplets/OtherElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][Button]

Maplets[Elements][Evaluate]

Maplets[Elements][Maplet]

Maplets[Elements][SetOption]

Maplets[Elements][Shutdown]

Maplets[Elements][TextField]

Maplets[Tools][Get]

Maplets[Tools][Set]

Overview of Maplet Applications

procedure