Bottom of Page . . Back to Variables and Variable Expressions . . Home
The following functions can be performed on variables.
Function |
Result |
|---|---|
| $(+,val1,val2,...,valn) | Returns the sum of the numbers val1,val2,...,valn. |
| $(-,val1,val2,...,valn) | Returns the result of subtracting the numbers val2 through valn from val1. |
| $(*,val1,val2,...,valn) | Returns the result of multiplying the numbers val1,val2,...,valn. |
| $(/,val1,val2,...,valn) | Returns the result of dividing the number val1 by val2,...,valn. |
| $(=,val1,val2) | If the numbers val1 and val2 are equal, 1 is
returned; otherwise 0 is returned. |
| $(<,val1,val2) | If the number val1 is less than val2, 1 is returned;
otherwise 0 is returned. |
| $(>,val1,val2) | If the number val1 is greater than val2, 1 is
returned; otherwise 0 is returned. |
| $(!=,val1,val2) | If the numbers val1 and val2 are not equal, 1
is returned; otherwise 0 is returned. |
| $(<=,val1,val2) | If the number val1 is less than or equal to val2, 1
is returned; otherwise 0 is returned. |
| $(>=,val1,val2) | If the number val1 is greater than or equal to val2, 1
is returned; otherwise 0 is returned. |
| $(AND,val1,val2,...,valn) | Returns the logical AND of the integers val1 through valn. Processing halts when a false condition is reached. |
| $(EC,string1,string2) | If string1 and string2 are identical, regardless of case,
1 is returned; otherwise 0 is returned. |
| $(EQ,string1,string2) | If string1 and string2 are identical, including case, 1
is returned; otherwise 0 is returned. |
| $(FIX,value) | Truncates the real number value to an integer by discarding any fractional part. |
| $(HTTPHEADER,set-cookie,name=value) | Adds the HTTP header set-cookie to an AppPage to set the name
cookie to the value value. See Setting and
Using Cookies by Adding HTTP Headers to AppPages for more information. |
| $(IF,expr,dotrue) | If expr is nonzero, dotrue is evaluated. |
| $(IF,expr,dotrue,dofalse) | If expr is nonzero, dotrue is evaluated. Otherwise, dofalse is evaluated and returned. The branch not chosen by expr is not evaluated. |
| $(INDEX,which,string) | string is assumed to contain one or more values delimited by the comma. The numeric value which selects one of these values to be extracted. Numbering of the items in string begins with 0. |
| $(ISINT,value) | If value is an integer, 1 is returned; otherwise 0
is returned. (A number that is of equal value to an integer, such as
1.0, evaluates to 1.) |
| $(ISNUM,value) | If value is numeric, 1 is returned; otherwise 0
is returned. |
| $(LOWER,string) | Returns string converted to lowercase letters. |
| $(NC,string1,string2) | If string1 and string2 are not identical, regardless of case,
1 is returned; otherwise 0 is returned. |
| $(NE,string1,string2) | If string1 and string2 are not identical, including case,
1 is returned; otherwise 0 is returned. |
| $(NOT,value) | Returns the logical negation of value. |
| $(NTH,which,arg0,arg1,...,argN) | Evaluates and returns the argument selected by which. If which
is 0, arg0 is returned, and so on. Note the difference
between $(NTH) and $(INDEX); $(NTH) returns one of a series of arguments
to the function while $(INDEX) extracts a value from a comma-delimited string
passed as a single argument. Arguments not selected by which are
not evaluated. |
| $(NXST,varname) | If variable varname does not exist (has not been assigned a numeric
or string value), 1 is returned; otherwise 0 is
returned. |
| $(OR,val1,val2,...,valn) | Returns the logical OR of the integers val1 through valn. Processing halts when a true condition is reached. |
| $(POSITION,string1,string2) | Returns the starting position of string2 within string1. If
string2 is not found, 0 is returned. |
| $(REPLACE,string1,string2,string3) | Replaces all instances of string2 with string3 within string1. |
| $(ROUND,value,digit) | Returns the numeric value rounded to no more than digit number of digits. |
| $(SETVAR,varname,value) | Sets the variable varname to the numeric or string value. |
| $(STRFILL,string,ncopies) | Returns the result of concatenating ncopies number of copies of string. |
| $(STRLEN,string) | Returns the length of string. |
| $(SUBSTR,string,start,length) | Returns the substring of string starting at character start and extending for length characters. Characters in the string are numbered from 1. If length is omitted, the entire remaining length of the string is returned. |
| $(TRACEMSG,string) | Writes the message string to the log file specified by the MI_WEBLOGFILE parameter in the wcconfig.std file. |
| $(TRIM,string) | Removes leading and trailing white space from string. |
| $(TRUNC,value,digit) | Returns the numeric value truncated to no more than digit number of digits. |
| $(UNHTML,string) | Returns string with special HTML characters replaced with their entity reference for display by a Web browser. |
| $(UNSETVAR,varname) | Unsets the variable varname. No error is generated if varname is not set. |
| $(UPPER,string) | Returns string converted to uppercase letters. |
| $(URLDECODE,string) | Returns string with all hexadecimal values replaced with their nonalphanumeric ASCII characters. |
| $(URLENCODE,string) | Returns string with all nonalphabetic ASCII characters replaced with their hexadecimal values. |
| $(XOR,val1,val2,...,valn) | Returns the logical XOR of the integers val1 through valn. |
| $(XST,varname) | If variable varname exists (has been assigned a numeric or string
value), 1 is returned; otherwise 0 is returned. |