- XBHELP ; IHS/ADC/GTH - DISPLAY HELP TEXT FROM ROUTINE ; [ 02/07/97 3:02 PM ]
- ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
- ;
- ; Display text from the named routine, beginning at the
- ; named label. The fourth semi-colon piece is displayed.
- ; If the third semi-colon piece is "@", the indirection
- ; of the fourth semi-colon piece is written. The display
- ; ends if null or "###" is returned.
- ;
- ; E.g:
- ;
- ; D HELP^XBHELP("LABEL","ROUTINE",0) will print the text
- ; after LABEL:
- ;
- ; ROUTINE ;
- ; LABEL ;
- ; ;;Please enter what I think you should enter.
- ; ;;@;*7
- ; ;;@;!
- ; ;;###
- ;
- HELP(L,R,T) ;PEP - Display text at label L, routine R, tab T spaces (default 4).
- Q:$D(ZTQUEUED)
- S:$G(T)'?1.N T=4
- NEW X
- W !
- F %=1:1 S X=$T(@L+%^@R) Q:($P(X,";",3)="###")!(X="") D
- . I $P(X,";",3)="@" W @($P(X,";",4)) Q
- . W !?T,$P(X,";",3)
- .Q
- Q
- ;
- XBHELP ; IHS/ADC/GTH - DISPLAY HELP TEXT FROM ROUTINE ; [ 02/07/97 3:02 PM ]
- +1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
- +2 ;
- +3 ; Display text from the named routine, beginning at the
- +4 ; named label. The fourth semi-colon piece is displayed.
- +5 ; If the third semi-colon piece is "@", the indirection
- +6 ; of the fourth semi-colon piece is written. The display
- +7 ; ends if null or "###" is returned.
- +8 ;
- +9 ; E.g:
- +10 ;
- +11 ; D HELP^XBHELP("LABEL","ROUTINE",0) will print the text
- +12 ; after LABEL:
- +13 ;
- +14 ; ROUTINE ;
- +15 ; LABEL ;
- +16 ; ;;Please enter what I think you should enter.
- +17 ; ;;@;*7
- +18 ; ;;@;!
- +19 ; ;;###
- +20 ;
- HELP(L,R,T) ;PEP - Display text at label L, routine R, tab T spaces (default 4).
- +1 IF $DATA(ZTQUEUED)
- QUIT
- +2 IF $GET(T)'?1.N
- SET T=4
- +3 NEW X
- +4 WRITE !
- +5 FOR %=1:1
- SET X=$TEXT(@L+%^@R)
- IF ($PIECE(X,";",3)="###")!(X="")
- QUIT
- Begin DoDot:1
- +6 IF $PIECE(X,";",3)="@"
- WRITE @($PIECE(X,";",4))
- QUIT
- +7 WRITE !?T,$PIECE(X,";",3)
- +8 QUIT
- End DoDot:1
- +9 QUIT
- +10 ;