INLIST Function

Returns true if the target parameter matches any of the value parameters.

Category: Search
Returned data type: Boolean

Syntax

INLIST (target_parameter, value_parameter1 <, value_parameter2, ...>)

Required Arguments

target_parameter

specifies a string, integer or date value to search

value_parameter1

specifies a string, integer or date values to search for in target_parameter

Optional Argument

value_parameter2, ...

specifies one or more string, integer or date values to search for in target_parameter

Details

target_parameter is compared against each value_parameter. TRUE is returned if a match is found. Otherwise, FALSE is returned.

Example

string error_message

 

integer a

a=5

integer b

b=5

 

if (inlist(a,3,5)<>true)

   error_message="integer 5 not found in argument list of 3,5 "

else

   error_message="integer 5 was found in argument list of 3,5 "

 

print(error_message,false)