subroutine NEWPEN (ityp) c c This subroutine selects a pen - HIPLOT multi-color pen option. c Valid ityp values are in the range of 0 - 8, where zero c implies a pen return (whichever selected) to its holder, c and one thru eight selects a new pen. For a DMP-3 or -4 there c are actually only pens 1 thru 6, but for a DMP-6 or -7 there are c eight pens, 1 thru 8. c INTEGER*2 ITYPE LOGICAL*1 PSTR(2) DATA PSTR /'P',' '/ C ITYPE = MIN0(ityp , 8) ITYPE = MAX0(ITYPE, 0) C Convert integer to ASCII character: PSTR(2) = ITYPE + 48 CALL PLTOUT(PSTR,2) RETURN END