Changeset 40 for ccr/trunk/p/GPLCCR0.m


Ignore:
Timestamp:
Jul 3, 2008, 9:02:47 PM (16 years ago)
Author:
Christopher Edwards
Message:

fixed spacing issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/GPLCCR0.m

    r36 r40  
    1 GPLCCR0 ; CCDCCR/GPL - CCR TEMPLATE AND ACCESS ROUTINES; 5/31/08
    2                ;;0.1;CCDCCR;nopatch;noreleasedate
    3                W "This is a CCR TEMPLATE with processing routines",!
    4                W !
    5                Q
    6                ;
     1GPLCCR0 ; CCDCCR/GPL - CCR TEMPLATE AND ACCESS ROUTINES; 5/31/08
     2          ;;0.1;CCDCCR;nopatch;noreleasedate
     3          W "This is a CCR TEMPLATE with processing routines",!
     4          W !
     5          Q
     6          ;
    77ZT(ZARY,BAT,LINE)       ; private routine to add a line to the ZARY array
    8                ; ZARY IS PASSED BY NAME
    9                ; BAT is a string identifying the section
    10                ; LINE is a test which will evaluate to true or false
    11                ; I '$G(@ZARY) D
    12                . S @ZARY@(0)=0 ; initially there are no elements
    13                . W "GOT HERE LOADING "_LINE,!
    14                N CNT ; count of array elements
    15                S CNT=@ZARY@(0) ; contains array count
    16                S CNT=CNT+1 ; increment count
    17                S @ZARY@(CNT)=LINE ; put the line in the array
    18                ; S @ZARY@(BAT,CNT)="" ; index the test by battery
    19                S @ZARY@(0)=CNT ; update the array counter
    20                Q
    21                ;
     8          ; ZARY IS PASSED BY NAME
     9          ; BAT is a string identifying the section
     10          ; LINE is a test which will evaluate to true or false
     11          ; I '$G(@ZARY) D
     12          . S @ZARY@(0)=0 ; initially there are no elements
     13          . W "GOT HERE LOADING "_LINE,!
     14          N CNT ; count of array elements
     15          S CNT=@ZARY@(0) ; contains array count
     16          S CNT=CNT+1 ; increment count
     17          S @ZARY@(CNT)=LINE ; put the line in the array
     18          ; S @ZARY@(BAT,CNT)="" ; index the test by battery
     19          S @ZARY@(0)=CNT ; update the array counter
     20          Q
     21          ;
    2222ZLOAD(ZARY,ROUTINE)      ; load tests into ZARY which is passed by reference
    23               ; ZARY IS PASSED BY NAME
    24               ; ZARY = name of the root, closed array format (e.g., "^TMP($J)")
    25               ; ROUTINE = NAME OF THE ROUTINE - PASSED BY VALUE
    26               K @ZARY S @ZARY=""
    27               S @ZARY@(0)=0 ; initialize array count
    28               N LINE,LABEL,BODY
    29               N INTEST S INTEST=0 ; switch for in the TEMPLATE section
    30               N SECTION S SECTION="[anonymous]" ; NO section LABEL
    31               ;
    32               N NUM F NUM=1:1 S LINE=$T(+NUM^@ROUTINE) Q:LINE=""  D
    33               . I LINE?." "1";<TEMPLATE>".E S INTEST=1 ; entering section
    34               . I LINE?." "1";</TEMPLATE>".E S INTEST=0 ; leaving section
    35               . I INTEST  D  ; within the section
    36               . . I LINE?." "1";><".E  D  ; sub-section name found
    37               . . . S SECTION=$P($P(LINE,";><",2),">",1) ; pull out name
    38               . . I LINE?." "1";;".E  D  ; line found
    39               . . . D ZT(ZARY,SECTION,$P(LINE,";;",2)) ; put the line in the array
    40               Q
    41               ;
     23          ; ZARY IS PASSED BY NAME
     24          ; ZARY = name of the root, closed array format (e.g., "^TMP($J)")
     25          ; ROUTINE = NAME OF THE ROUTINE - PASSED BY VALUE
     26          K @ZARY S @ZARY=""
     27          S @ZARY@(0)=0 ; initialize array count
     28          N LINE,LABEL,BODY
     29          N INTEST S INTEST=0 ; switch for in the TEMPLATE section
     30          N SECTION S SECTION="[anonymous]" ; NO section LABEL
     31          ;
     32          N NUM F NUM=1:1 S LINE=$T(+NUM^@ROUTINE) Q:LINE=""  D
     33          . I LINE?." "1";<TEMPLATE>".E S INTEST=1 ; entering section
     34          . I LINE?." "1";</TEMPLATE>".E S INTEST=0 ; leaving section
     35          . I INTEST  D  ; within the section
     36          . . I LINE?." "1";><".E  D  ; sub-section name found
     37          . . . S SECTION=$P($P(LINE,";><",2),">",1) ; pull out name
     38          . . I LINE?." "1";;".E  D  ; line found
     39          . . . D ZT(ZARY,SECTION,$P(LINE,";;",2)) ; put the line in the array
     40          Q
     41          ;
    4242LOAD(ARY)       ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
    43                D ZLOAD(ARY,"GPLCCR0")
    44                ; ZWR @ARY
    45                Q
    46                ;
     43          D ZLOAD(ARY,"GPLCCR0")
     44          ; ZWR @ARY
     45          Q
     46          ;
    4747;<TEMPLATE>
    4848;;<?xml version="1.0" encoding="UTF-8"?>
Note: See TracChangeset for help on using the changeset viewer.