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

PRCSEB3.m

Go to the documentation of this file.
PRCSEB3 ;WISC/LJP-DAILY RECORD'S ADDING MACHINE ;11-6-89/15:27
V ;;5.1;IFCAP;;Oct 20, 2000
 ;Per VHA Directive 10-93-142, this routine should not be modified.
1 W !,"+ - * /" K PRCSE,PRCSOK S PRCSY=0 W ?29,"Total"
 F PRCSI=0:0 S PRCSE=0 R !," $ ",PRCSR:DTIME Q:PRCSR=""  G:PRCSR="^" 2 D @$S(PRCSR["*":3,PRCSR["/":4,PRCSR["-":5,1:"CK") S:'PRCSE PRCSY=PRCSR+PRCSY K PRCSVAR W ?27,$J(PRCSY,9,4)
2 K PRCSE,PRCSI,PRCSR,PRCSR1,PRCSR2,PRCSY Q
3 S PRCSR1=$P(PRCSR,"*",1),PRCSR2=$P(PRCSR,"*",2),PRCSR=PRCSR1 D CK Q:PRCSE  S PRCSR=PRCSR2 D CK Q:PRCSE  S PRCSR=PRCSR1*PRCSR2 W ?15,$J(PRCSR,9,4) Q
4 S PRCSR1=$P(PRCSR,"/",1),PRCSR2=$P(PRCSR,"/",2),PRCSR=PRCSR1 D CK Q:PRCSE  S PRCSR=PRCSR2 D CK Q:PRCSE  S PRCSR=PRCSR1/PRCSR2 W ?15,$J(PRCSR,9,4) Q
5 S PRCSR=+PRCSR I PRCSR>0 S PRCSR=-PRCSR D CK Q
 Q
CK S:PRCSR["?"!(+PRCSR=0)!(PRCSR<-999999.9999)!(PRCSR>999999.9999)!(PRCSR'?."-".N.1".".2N) PRCSE=1 D:PRCSE W Q
W W $C(7),!,"Must be numeric, between -999999.9999 and 999999.9999 and not ZERO",! Q