📄 rotate.f
字号:
$alias fdopen='fdopen'(%val,%ref) include 'phigs.f1.h' ! get the HP-PHIGS aliases program Rotate ! file "Rotate.f" include 'phigs.f2.h' ! get the HP-PHIGS constants integer*4 WorkstnID ! workstation identifier parameter (WorkstnID=1) ! value chosen by the user integer*4 ConnID ! connection identifier integer*4 WorkstnType ! workstation type parameter (WorkstnType=POIDDX) ! out/in, direct, dbl bfr, X integer*4 Angle ! current rotation angle character*20 String ! string holder integer*4 fdopen ! to get file descriptor real rad, deg ! type the statement function rad(deg)= ((deg)*3.14159265358979/180.) ! convert degrees to radians call popph(fdopen(fnum(7), 'w'//char(0)), 0) ! open phigs call pue004('/dev/screen/phigs_window', ConnID) ! get connection ID call popwk(WorkstnID, ConnID, WorkstnType)! open workstation call popst(1) ! open display list structure call pschh(0.035) ! set character size call pstxal(PALEFT, PAHALF) ! set text alignment do Angle=0,345,15 ! every 15 degrees write(unit=String, fmt='("-----Angle=",i3)') Angle call pschup(cos(rad(real(angle))),sin(rad(real(Angle)))) call ptx(.5, .5, String) end do call pclst ! close display list structure call ppost(WorkstnID, 1, 1.) ! send picture to display call puwk(WorkstnID, PPERFO) ! update the workstation call pclwk(WorkstnID) ! close workstation call pclph ! close phigs stop ! stop processing end ! end of program
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -