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

ACRFDOLL.m

Go to the documentation of this file.
ACRFDOLL ;IHS/OIRM/DSD/THL,AEF - CONVERT NUMERIC DOLLARS TO ALPHA STATEMENTS; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE USED TO CONVERT NUMERIC DOLLARS TO ALPHA STATEMENTS
EN D EN1
EXIT K ACR
 Q
EN1 S X=$P(ACRAMT,".")
 S ACRL=$L(X)
 S ACRAMTX=""
 F ACRI=1:1:$L(X) D
 .S ACRY=$E(X,ACRI)
 .S ACRI($L(X)-ACRI+1)=ACRY
 S X=0
 F  S X=$O(ACRI(X)) Q:'X  D
 .S ACRNUM=$S(X=2!(X=5)!(X=8):$P($T(@(ACRI(X)_0)),";;",2),1:$P($T(@ACRI(X)),";;",2))
 .S:ACRNUM]"" ACRAMTX=ACRNUM_$S(X#3=0:" HUNDRED",1:"")_$S(X=7:" MILLION",X=4:" THOUSAND",1:"")_" "_ACRAMTX
 Q
0 ;;
1 ;;ONE
2 ;;TWO
3 ;;THREE
4 ;;FOUR
5 ;;FIVE
6 ;;SIX
7 ;;SEVEN
8 ;;EIGHT
9 ;;NINE
10 ;;TEN
20 ;;TWENTY
30 ;;THIRTY
40 ;;FORTY
50 ;;FIFTY
60 ;;SIXTY
70 ;;SEVENTY
80 ;;EIGHTY
90 ;;NINETY