☜ | $%PRODUCEDraft MDC Standard | ☞ |
PRODUCE(IN,SPEC,MAX) ; New VALUE,AGAIN,P1,P2,I,COUNT Set VALUE=IN,COUNT=0 For Do Quit:'AGAIN . Set AGAIN=0 . Set I="" . For Set I=$Order(SPEC(I)) Quit:I="" Do Quit:COUNT<0 . . Quit:$Get(SPEC(I,1))="" . . Quit:'($Data(SPEC(I,2))#2) . . For Quit:VALUE'[SPEC(I,1) Do Quit:COUNT<0 . . . Set P1=$Piece(VALUE,SPEC(I,1),1) . . . Set P2=$Piece(VALUE,SPEC(I,1),2,$Length(VALUE)) . . . Set VALUE=P1_SPEC(I,2)_P2,AGAIN=1 . . . Set COUNT=COUNT+1 . . . If $Data(MAX),COUNT>MAX Set COUNT=–1,AGAIN=0 . . . Quit . . Quit . Quit Quit VALUE
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.
Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.
This page most recently updated on 16-Nov-2023, 16:55:32.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)