PROGRAM PLTTST C..... To test the PLTRTN LOGICAL*1 ICHR(4) DIMENSION IBUF(6),MES1(4),MES2(5),MES3(4) DATA IBUF/'He','ll','o ','Th','er','e '/ DATA ILUN,IDEV,IDEVNO/3,'TI',0/ DATA MES1/'Al','ph','a ','> '/ DATA MES2/'In','te','ge','r ','> '/ DATA MES3/'Fl','oa','t ','> '/ C..... Set our TI lun to 1 CALL SETLUN(1,IDEV,IDEVNO) CALL AUTOCR(0) ! Turn off Auto CR-LF CALL CLRSCN(1) ! Clear the screen CALL PSREAD(II,1,5,1) ! Pause before continuing C...... Now write this phrase diagonally across the screen, C...... Except start at the bottom left DO 22 I=1,24 22 CALL PSWRIT(IBUF,12,25-I,5+I*2-1) C CALL PSREAD(II,1,5,1) ! Pause before continuing C...... Now erase the 5 lines in the middle of the screen C...... except do it backwards. DO 20 I=8,15 20 CALL CLRLN(23-I) C CALL PSREAD(II,1,5,1) ! Pause before continuing C...... Print a phrase diagonally across the screen DO 10 I=1,24 10 CALL PSWRIT(IBUF,12,I,5+I*2-1) C CALL PSREAD(II,1,5,1) ! Pause before continuing C..... Erase these lines again, except do it C..... from top to bottom DO 24 I=8,15,1 24 CALL CLRLN(I) C CALL PSREAD(II,1,5,1) ! Pause before continuing C..... Now Write the same phrase, except diagonally C.... the opposite way. DO 30 I=1,8 30 CALL PSWRIT(IBUF,12,I+7,I*9-8) DO 32 I=1,8 32 CALL PSWRIT(IBUF,12,16-I,I*9-8) C..... Change our TT lun to 5 CALL SETLUN(5) CALL PSREAD(II,1,5,1) ! Pause before continuing C..... Now clear the bottom of the screen C CALL CLRSCN(18) C CALL PSREAD(II,1,5,1) ! Pause before continuing C.... Let's try some data entry type stuff. C..... Let's say that we have 4 fields that need C..... data, 1 A format, 2 I format, and 1 E format. C..... and we want to spread them out 2 per line, seperated C..... by two lines that contain blocks C CALL CLRSCN(1) ! Clear the screen CALL GRPH ! Set the terminal in graphics mode IBLK = 'aa' ! lower case a generates a block DO 210 I2=10,11 ! To draw 2 rows of blocks DO 200 I1 = 1,80 ! Draw a row of blocks 200 CALL PSWRIT(IBLK,2,I2,I1*2-1) 210 CONTINUE DO 225 I=12,14,2 DO 220 I1=1,8 I2=I1+16 I3=I1+32 CALL PSWRIT(IBLK,2,I,I3*2-1) CALL PSWRIT(IBLK,2,I,I2*2-1) 220 CALL PSWRIT(IBLK,2,I,I1*2-1) DO 230 I1 = 1,80 ! Draw a row of blocks 230 CALL PSWRIT(IBLK,2,I+1,I1*2-1) 225 CONTINUE CALL NOGRPH CALL PSWRIT(MES1,8,12,18) ! Output message 1 CALL PSWRIT(MES2,10,12,50) ! Output the second message CALL PSWRIT(MES2,10,14,18) ! Output the second message again CALL PSWRIT(MES3,8,14,50) ! Output the third message C..... Now all the fields are set up, so lets C..... try to input some data. To do this, position C..... the cursor to the end of each data field and C..... use formatted FORTRAN I/O to perform the C..... actual read. CALL POSCUR(12,18+8) ! Position for the alpha field READ (1,400) ICHR ! Read the alpha field 400 FORMAT(4A1) CALL POSCUR(12,50+10) ! Position the cursor to 1st integer READ (1,410) INUM ! Read the 1st integer field 410 FORMAT(I4) CALL POSCUR(14,18+10) ! Position the cursor to 2nd integer READ (1,410) INUM1 ! Read the second integer field CALL POSCUR(14,50+8) ! Position the cursor READ (1,420) FLOT ! Read float number 420 FORMAT(E5.1) C..... OK - Now that we've read it, display it!! CALL POSCUR(20,1) ! Position to start of line 20 WRITE(5,510)ICHR,INUM,INUM1,FLOT 510 FORMAT('+','Input values were : ',4A1,',',I4,',',I4,',',E10.5) CALL PSREAD(II,1,5,1) ! Pause before continuing C..... Well, thats the end of the test for now C..... Clear the screen and exit CALL NOGRPH ! Turn off graphics CALL CLRSCN ! Clear the screen CALL AUTOCR(1) ! Turn on Auto CR-LF STOP END