Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LA7UTILD

LA7UTILD.m

Go to the documentation of this file.
  1. LA7UTILD ;DALOI/JMC - Duplicate comment check ;Jan 29, 2007
  1. ;;5.2;AUTOMATED LAB INSTRUMENTS;**74**;Sep 27, 1994;Build 229
  1. ;
  1. Q
  1. ;
  1. ;
  1. DUPCHK(LA7A,LA7B,LA7C) ; Perform duplicate comment check of two arrays, return unique entries in 3rd array
  1. ; Call with LA7A = array of existing comments on file (pass by reference)
  1. ; LA7B = array of new comments to check against existing comments (LA7A array) (pass by reference)
  1. ;
  1. ; Returns LA7C = array with only those comments that are new/unique (pass by reference)
  1. ;
  1. N LA7DUP,LA7I,LA7J,LA7K,LA7X,LA7Y
  1. S (LA7I,LA7J,LA7K)=0
  1. F S LA7I=$O(LA7B(LA7I)) Q:'LA7I D
  1. . S LA7X=$P(LA7B(LA7I,0),"^"),LA7X=$TR(LA7X," ",""),LA7X=$$UP^XLFSTR(LA7X)
  1. . S (LA7DUP,LA7J)=0
  1. . F S LA7J=$O(LA7A(LA7J)) Q:'LA7J D Q:LA7DUP
  1. . . S LA7Y=$P(LA7A(LA7J,0),"^"),LA7Y=$TR(LA7Y," ",""),LA7Y=$$UP^XLFSTR(LA7Y)
  1. . . I LA7X=LA7Y S LA7DUP=1
  1. . I 'LA7DUP S LA7K=LA7K+1,LA7C(LA7K,0)=LA7B(LA7I,0)
  1. Q