daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Oct 29th, 2018 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IDENTIFICATION DIVISION.
  2. PROGRAM-ID. FONTS-TEST.
  3. AUTHOR. JP.
  4. DATA DIVISION.
  5.     WORKING-STORAGE SECTION.
  6.         01 TEST-FONTS.
  7.         05 TEST-FONTS-TABLE OCCURS 5 TIMES INDEXED BY I.
  8.         10 FONT-NAME PIC X(50).
  9.         10 FONT-SIZE PIC 9(5).
  10.         01 MENTIONED-FONTS OCCURS 5 TIMES INDEXED BY J.
  11.         05 MF-NAME PIC X(50).
  12.         05 MF-SIZE PIC 9(5).
  13. PROCEDURE DIVISION.
  14.     MOVE "Verdana" TO FONT-NAME(1).
  15.     MOVE 10 TO FONT-SIZE(1).
  16.     MOVE "Verdana" TO FONT-NAME(2).
  17.     MOVE 10 TO FONT-SIZE(2).
  18.     MOVE "Verdana" TO FONT-NAME(3).
  19.     MOVE 8 TO FONT-SIZE(3).
  20.     MOVE "Fixedsys" TO FONT-NAME(4).
  21.     MOVE 8 TO FONT-SIZE(4).
  22.     MOVE "Courier New" TO FONT-NAME(5).
  23.     MOVE 10 TO FONT-SIZE(5).
  24.    
  25.     PERFORM VARYING I FROM 1 BY 1 UNTIL I IS GREATER THAN 5
  26.     SET J TO 1
  27.     SEARCH MENTIONED-FONTS
  28.    
  29.     AT END DISPLAY FONT-NAME(I) " " FONT-SIZE(I)
  30.     MOVE FONT-NAME(I) TO MF-NAME(I)
  31.     MOVE FONT-SIZE(I) TO MF-SIZE(I)
  32.    
  33.     WHEN FONT-NAME(I) EQUALS MF-NAME(J) AND FONT-SIZE(I) EQUALS MF-SIZE(J)
  34.     CONTINUE
  35.     END-SEARCH
  36.  
  37.     END-PERFORM.
  38. STOP RUN.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top