1 | DIWE5 ;SFISC/GFT-WP, AUX FUNCTIONS ;10/28/96 14:54
|
---|
2 | ;;22.0;VA FileMan;;Mar 30, 1999
|
---|
3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | ;
|
---|
5 | LNQ ;
|
---|
6 | W !,"ANSWER WITH A LINE NUMBER ("_(I'=6)_$P("-"_DWLC,U,DWLC>1)_")"
|
---|
7 | I $D(DWL) W !?9,"OR A SPACE TO MEAN THE CURRENT LINE ("_DWL_")" W:DWL>2 !?9,"OR '-' TO MEAN LINE ",DWL-1,", '-2' TO MEAN ",DWL-2,", ",$P("'+' TO MEAN "_(DWL+1)_", ",U,DWL<DWLC)_"ETC."
|
---|
8 | W ! Q
|
---|
9 | ;
|
---|
10 | WL W !,"INITIALS:",! S X=$P(DIC,"(",1) Q:$D(@X)<9 S X=$O(@(X_"(0)"))-1,I=0 F S X=$O(^(X)) Q:X="" W X,!
|
---|
11 | S X=-1 Q
|
---|
12 | NL W !,"TEXT NAMES:",! S %T2="",I=0 F S %T2=$O(@(DW_")")) Q:%T2="" W %T2,?20,^(%T2,0),!
|
---|
13 | K %T2 Q
|
---|
14 | ;
|
---|
15 | F ;
|
---|
16 | W !!,"Line WIDTH: "_DWLW_"//" R X:DTIME S DWLW=$S(X<10:DWLW,X>255:DWLW,1:X\1)
|
---|
17 | W !,"PACK "_$S(DWPK:"ON",1:"OFF")_"//" R X:DTIME S DWPK=$S(X="ON":1,1:0)
|
---|
18 | Q
|
---|
19 | X D ASK^DIWE11 Q:X="" S DIWL=X,(%,%B)="" X ^%ZOSF("EOFF")
|
---|
20 | ENT I '$D(DIWL) S DIWL=245
|
---|
21 | A R X#245:30 E I '$L(X) D S:$L(%B) G XQ^DIWE11
|
---|
22 | S:X="" X=" " I X?.ANP S Y=X G D
|
---|
23 | S I=0,Y=""
|
---|
24 | C S I=I+1 I $E(X,I,999)?.ANP S Y=Y_$E(X,I,999) G D
|
---|
25 | S %=$E(X,I),%0=$A(%)
|
---|
26 | I %?1C S %="" I %0=9 S %=$E(" ",1,9-($L(Y)-($L(Y)\9*9)))
|
---|
27 | S Y=Y_% D S:$L(Y)>DIWL I ":27:13:"[(":"_%0_":") D S
|
---|
28 | G C
|
---|
29 | D D S G D:$L(Y)'<DIWL S %B=Y,Y="" G A
|
---|
30 | S S:$L(%B) %B=%B_$S($E(Y)=" ":"",1:" ") S %=%B_Y,%2=$L(%) Q:'%2 S Y=""
|
---|
31 | I %2>DIWL F %1=DIWL:-1 I %1<$S(DIWL-12>0:DIWL-12,1:4)!(" -"[$E(%,%1)) S Y=$E(%,%1+1+$S($E(%,%1+1)=" ":1,1:0),999),%=$E(%,1,%1-$S($E(%,%1)=" ":1,1:0)) Q
|
---|
32 | S %B="",DWLC=DWLC+1,@(DIC_"DWLC,0)")=%
|
---|
33 | Q
|
---|
34 | TQ ;
|
---|
35 | W !?4,"IF YOU WANT TO USE TEXT FROM THE '"_J_"' FIELD",!?4,"OF ANOTHER '"
|
---|
36 | W I,"' ENTRY, TYPE THE NAME OF THAT ENTRY",!?4,"OTHERWISE, "
|
---|
37 | W "USE A COMPUTED-FIELD EXPRESSION TO DESIGNATE SOME W-P TEXT",!
|
---|
38 | G Z^DIWE3
|
---|
39 | ;
|
---|
40 | IQ ;
|
---|
41 | I $D(DC) W:$D(^DD(+$P(DC,U,2),.01,3)) !?4,^(3),! X:$D(^(4)) ^(4) F %=0:0 S %=$O(^DD(+$P(DC,U,2),.01,21,%)) Q:%'>0 W !,^(%,0)
|
---|
42 | W !!,"You are ready to enter a line of text.",!,"If you have no text to enter,just ",$S(DIWPT="":"press the return key.",1:"type in """_DIWPT_"""."),!
|
---|
43 | W "Type 'CONTROL-I' (or TAB key) to insert tabs.",!
|
---|
44 | W "When text is output, these formatting rules will apply:"
|
---|
45 | W !," A) Lines containing only punctuation characters, or lines containing tabs",!?5,"will stand by themselves, i.e., no wrap-around."
|
---|
46 | W !," B) Lines beginning with spaces will start on a new line."
|
---|
47 | W !," C) Expressions between '|' characters will be evaluated as"
|
---|
48 | W !?5,"'computed-field expressions and then be printed as evaluated"
|
---|
49 | W !?5,"thus '|NAME|' would cause the current name to be inserted in the text."
|
---|
50 | W !!,$C(7),"Want to see a list of allowable formatting 'WINDOWS'" S %=2 D YN^DICN Q:%-1
|
---|
51 | W !?5,"SPECIAL FORMATTING INCLUDES: "
|
---|
52 | FN S %=15 F S %=$O(^DD("FUNC",%)) Q:%>97 I $D(^(%,10)) W !," |"_$P(^(0),U,1)_$P("(ARGUMENT)",U,$S('$D(^(3)):1,1:^(3)'=0))_"|",?25 W:$D(^(9)) ^(9)
|
---|