Jess Multifield Functions

List of multifield functions that can be executed by Jess.


8.32. (complement$ <multifield-expression> <multifield-expression>)

Package:
MultiFunctions
Arguments:
Two multifields
Returns:
Multifield
Description:
Returns a new multifield consisting of all elements of the second multifield not appearing in the first multifield.

8.35. (create$ <expression>*)

Package:
MultiFunctions
Arguments:
Zero or more expressions
Returns:
Multifield
Description:
Appends its arguments together to create a multifield value. Returns a new multifield containing all the given arguments, in order. For each argument that is a multifield, the individual elements of the multifield are added to the new multifield; this function will not create nested multifields (which are not meaningful in the Jess language.) Note: multifields must be created explicitly using this function or others that return them. Multifields cannot be directly parsed from Jess input.

8.39. (delete$ <multifield-expression> <begin-integer-expression> <end-integer-expression>)

Package:
MultiFunctions
Arguments:
A multifield and two integer expressions
Returns:
Multifield
Description:
Deletes the specified range from a multifield value. The first numeric expression is the 1-based index of the first element to remove; the second is the 1-based index of the last element to remove.

8.50. (explode$ <string-expression>)

Package:
MultiFunctions
Arguments:
One string
Returns:
Multifield
Description:
Creates a multifield value from a string. Parses the string as if by a succession of read calls, then returns these individual values as the elements of a multifield.

8.56. (first$ <multifield-expression>)

Package:
MultiFunctions
Arguments:
One multifield
Returns:
Multifield
Description:
Returns the first field of a multifield as a new 1-element multifield.

8.69. (implode$ <multifield-expression>)

Package:
MultiFunctions
Arguments:
One multifield
Returns:
String
Description:
Creates a string from a multifield value. Converts each element of the multifield to a string, and returns these strings concatenated with single intervening spaces.

8.71. (insert$ <multifield-expression> <integer-expression> <single-or-multifield-expression>+)

Package:
MultiFunctions
Arguments:
A multifield, an integer, and one or more multifields
Returns:
A multifield
Description:
Inserts one or more values in a multifield. Inserts the elements of the second and later multifields so that they appear starting at the given 1-based index of the first multifield.

8.74. (intersection$ <multifield-expression> <multifield-expression>)

Package:
MultiFunctions
Arguments:
Two multifields
Returns:
Multifield
Description:
Returns the intersection of two multifields. Returns a multifield consisting of the elements the two argument multifields have in common.

8.77. (length$ <multifield-expression>)

Package:
MultiFunctions
Arguments:
Multifield
Returns:
Integer
Description:
Returns the number of fields in a multifield value.

8.90. (member$ <single-field-expression> <multifield-expression>)

Package:
MultiFunctions
Arguments:
A value and a multifield
Returns:
Integer or FALSE
Description:
Returns the position (1-based index) of a single-field value within a multifield value; otherwise, returns FALSE.

8.98. (nth$ <integer-expression> <multifield-expression>)

Package:
MultiFunctions
Arguments:
A number and a multifield
Returns:
(Varies)
Description:
Returns the value of the specified (1-based index) field of a multifield value.

8.113. (replace$ <multifield-expression> <begin-integer-expression> <end-integer-expression> <multifield-expression>+)

Package:
MultiFunctions
Arguments:
A multifield, two numeric expressions, and one or more additional single or multifield values
Returns:
Multifield
Description:
Replaces the specified range of a multifield value with a set of values. The variable number of final arguments are inserted into the first multifield, replacing elements between the 1-based indices given by the two numeric arguments, inclusive. Example:
Jess> (replace$ (create$ a b c) 2 2 (create$ x y z))
(a x y z c)

8.146. (subseq$ <multifield-expression> <begin-integer-expression> <end-integer-expression>)

Package:
MultiFunctions
Arguments:
A multifield and two numeric expressions
Returns:
Multifield
Description:
Extracts the specified range from a multifield value consisting of the elements between the two 1-based indices of the given multifield, inclusive.

8.157. (union$ [<multifield-expression>]+)

Package:
MultiFunctions
Arguments:
One or more multifields
Returns:
Multifield
Description:
Returns a new multifield consisting of the union of all of its multifield arguments (i.e., of all the elements that appear in any of the arguments with duplicates removed).