Last change
on this file since 691 was 613, checked in by George Lilly, 15 years ago |
initial load of WorldVistAEHR
|
File size:
840 bytes
|
Rev | Line | |
---|
[613] | 1 | VAFADDR ;ALB/MIR - ADDRESS UTILITIES (INPUT AND OUTPUT TRANSFORM) ; 25 JAN 93
|
---|
| 2 | ;;5.3;Registration;;Aug 13, 1993
|
---|
| 3 | ;
|
---|
| 4 | ; This routine contains generic input and output transforms for the
|
---|
| 5 | ; ZIP+extension fields which reside in DHCP
|
---|
| 6 | ;
|
---|
| 7 | ZIPIN ; input transform for ZIP - massages user input and returns data
|
---|
| 8 | ; in FileMan internal format (no '-'s)
|
---|
| 9 | ;
|
---|
| 10 | ; Input: X as user entered value
|
---|
| 11 | ; Output: X as internal value of user input OR
|
---|
| 12 | ; undefined if input from user was invalid
|
---|
| 13 | ;
|
---|
| 14 | N %
|
---|
| 15 | I X'?.N F %=1:1:$L(X) I $E(X,%)?1P S X=$E(X,0,%-1)_$E(X,%+1,20),%=%-1
|
---|
| 16 | I X'?5N,(X'?9N) K X
|
---|
| 17 | Q
|
---|
| 18 | ;
|
---|
| 19 | ;
|
---|
| 20 | ZIPOUT ; output transform for ZIP - prints either ZIP or ZIP+4 (in 12345-1234)
|
---|
| 21 | ; format.
|
---|
| 22 | ;
|
---|
| 23 | ; Input: Y as FileMan internal value
|
---|
| 24 | ; Output: Y as external format (12345 or 12345-1234)
|
---|
| 25 | ;
|
---|
| 26 | S Y=$E(Y,1,5)_$S($E(Y,6,9)]"":"-"_$E(Y,6,9),1:"")
|
---|
| 27 | Q
|
---|
Note:
See
TracBrowser
for help on using the repository browser.