@GETPARAM NAME=<name [TYPE=text] [ENCODING=encoding [FORMAT=format] [{array attributes}]>
<@GETPARAM> retrieves the contents of a parameter variable within a Tango class file. This tag is similar to <@VAR>, but performs error checking to ensure that only parameters of a Tango class file (which must be in method scope) can be retrieved.
This meta tag is specifically used for retrieving the value of a parameter in a Tango class file. If the variable specified by the NAME attribute is not a Tango class file parameter, this tag returns an error.
Note: Because the parameter
variables specified by <@GETPARAM> are only valid in method
scope, scope cannot be specified in the NAME attribute, unlike the
<@VAR> meta tag (for example, NAME=local$foo generates
incorrect results).
This tag is only valid within a Tango class file method.
When retrieving the contents of a text variable (standard variable), the result of <@GETPARAM> is always a text string.
<@GETPARAM> may also be used to retrieve an array. However, <@GETPARAM> does different things to arrays based on context: <@GETPARAM> converts the array to text whenever the result of the tag is returned in Results HTML, or when TYPE=text is specified; <@GETPARAM> returns an internal reference to the array when it is used to copy an array from one place to another. So, if <@GETPARAM> is used within <@ASSIGN>, then no conversion to text is performed (unless the TYPE="text" attribute is specified).
There are array-returning attributes that can be used to specify prefixes and suffixes for the returned array, rows within the array, and columns within the rows. They are described in the section Array-to-Text Conversion Attributes. By default, the returned array is formatted as an HTML table.
Within the return HTML of a Tango class file method, you could use the following series of meta tags to get the value of an In parameter (in this case, the radius of a sphere), perform calculations on it (calculating the surface area of a sphere), and set the value of a returned (Out) parameter accurate to two decimal places:
<@SETPARAM NAME=OutSurface VALUE=<@CALC EXPR="4*P*(<@GETPARAM NAME=Radius>^2)" PRECISION=2>>
Array-to-Text
Conversion Attributes
Encoding Attribute
Format Attribute
<@SETPARAM>
Copyright © 1999, Pervasive Software. All rights reserved.