Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

$PIECE

1977 Version of ANSI Standard

3.2.8 Functions function

$P[IECE]( expr1 , expr2 , intexpr3 )

Let expr1, expr2 be the strings S, D. Let intexpr3 be the integer in. $P(S, D, m) returns the substring of S bounded by but not including the m–1th and the mth occurrences of D.

$P(S, D, m) = $E(S, NF(S, D, m–1), NF(S, D, m) - $L(D) - 1).

$P[IECE]( expr1 , expr2 , intexpr3 , intexpr4 )

Let intexpr4 be the integer n. $P(S, D, m, n) returns the substring of S bounded on the left but not including the (m–1)th occurrence of D in S, and bounded on the right but not including the nth occurrence of D in S.

$P(S, D, in, n) = $E(S, NF(S, D, m–1), NF(S, D, n) - $L(D) - 1).

Note that $P(S, D, m, m) = $P(S, D, m).

See also the transition diagram for $Piece.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

This page most recently updated on 15-Nov-2023, 13:11:13.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)