SEGMENT: apply the function to sections, for example,
S = (/T,T,T, F,F, T,T, F, T,T/) ! ----- --- --- - --- SUM_PREFIX((/1,2,3, 4,5, 6,1, 2, 3,4/),SEGMENT=S) = (/1,3,6, 4,9, 6,7, 2, 3,7/)
EXCLUSIVE: scalar LOGICAL. If .FALSE. (default) then each element takes part in operation for its position, otherwise it does not and the first scanned element has identity value.
PRODUCT_PREFIX((/1,2,3,4/), EXCLUSIVE=.TRUE.) = (/1,1,2,6/) SUM_PREFIX((/1,2,3,4/), EXCLUSIVE=.TRUE.) = (/0,1,3,6/)
For more information, click here