$UNPACK string function $UNPACK string function Syntax $UNPACK (string_array[ index ], first_char, num_chars) Function Return a substring from an array of 128-character string variables. Parameters string_array String array variable from which the substring is to be extracted. It is assumed that each string within the array is defined and is 128 characters long. index Optional integer value(s) that identifies the first array element to be considered. The first_char value is interpreted relative to the element specified by this index. If no index is specified, element zero is assumed.
first_char Real-valued expression that specifies the position of the first character of the substring within the string array. A value of 1 corresponds to the first character of the specified string array element. This value must be greater than zero. The value of first_char can be greater than 128. In that case the array element accessed follows the element specified in the function call. For example, a value of 130 corresponds to the second character in the array element following that specified by index. num_chars Real-valued expression that specifies the number of characters to be returned by the function. This value can range from 0 to 128.
Details This function extracts a substring from an array of strings. Substrings are permitted to overlap two string array elements. For example, a 10-character substring whose first character is the 127th character in element [3] is composed of the last two characters in element [3] followed by the first eight characters of element [4]. In order to efficiently access the string array, this function assumes that all of the array elements are defined and are 128 characters long. For multidimensional arrays, only the eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 553