Maplets[Elements]
Argument
specify an argument for an Evaluate element
Calling Sequence
Parameters
Description
Examples
Argument(opts)
opts
-
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.
Option
I
R
G
S
source*
x
quotedtext
value*
*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:
with⁡MapletsElements:
maplet≔Maplet⁡TextFieldTF1⁡,ButtonB1⁡Integrate w.r.t. x,Evaluate⁡target=TF1,function=f,Argument⁡TF1,ButtonB2⁡OK,Shutdown⁡TF1:
MapletsDisplay⁡maplet
This Maplet application can also be written as:
maplet≔Maplet⁡TextFieldTF1⁡,ButtonB1⁡Integrate w.r.t. x,Evaluate⁡TF1=f⁡TF1,ButtonB2⁡OK,Shutdown⁡TF1:
The expression f⁡TF1 must be placed in unevaluation quotes. Otherwise, the function f⁡TF1 evaluates to TF1⁢x.
The same example, but using Argument with 'value':
maplet≔Maplet⁡TextFieldTF1⁡,ButtonB1⁡Integrate w.r.t. x,Evaluate⁡target=TF1,function=diff,Argument⁡TF1,Argument⁡value=x,ButtonB2⁡OK,Shutdown⁡TF1:
The following Maplet application counts the number of characters in a string input:
maplet≔Maplet⁡TextFieldTF1⁡This is a test,TextFieldTF2⁡,editable=false,ButtonB1⁡Count,onclick=Evaluate⁡target=TF2,function=length,Argument⁡TF1,quotedtext=true,ButtonB2⁡OK,Shutdown⁡TF2:
See Also
int
Maplets/OtherElements
Maplets[Display]
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