specify an argument for an Evaluate element - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Maplets : Elements : Other Elements : Maplets/Elements/Argument

Maplets[Elements][Argument] - specify an argument for an Evaluate element

Calling Sequence





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



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.
































*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.


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


maplet:=MapletTextField'TF1',Button'B1'Integrate w.r.t. x,Evaluate'target'='TF1','function'=f,Argument'TF1',Button'B2'OK,Shutdown'TF1':


This Maplet application can also be written as:

maplet:=MapletTextField'TF1',Button'B1'Integrate w.r.t. x,Evaluate'TF1'='fTF1',Button'B2'OK,Shutdown'TF1':


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

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

maplet:=MapletTextField'TF1',Button'B1'Integrate w.r.t. x,Evaluate'target'='TF1','function'='diff',Argument'TF1',Argument'value'=x,Button'B2'OK,Shutdown'TF1':


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

maplet:=MapletTextField'TF1'This is a test,TextField'TF2',editable=false,Button'B1'Count,'onclick'=Evaluatetarget='TF2',function='length',Argument'TF1',quotedtext=true,Button'B2'OK,Shutdown'TF2':


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

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