===================================================
Notepad++ Edit
(defun c:sT()
;三角函數中度度量的書寫法
(setq a1 (getpoint "請用滑鼠點一點:"))
(setq s2 (sin (/ pi 2)))
(princ "\nPI=")(princ pi)
(princ "\ns2=(sin (/ pi 2))=")(princ s2)
(setq s3 (sin (/ 3.1415927 2)))
(princ "\nPI=")(princ pi)
(princ "\ns3=(sin (/ 3.1415927 2))=")(princ s3)
(princ "\n============================================\n")
(setq Sx1 (sin (/ 3.1415927 1)))
(princ "\nSx1=(sin (/ 3.1415927 1))=")(princ sx1)
(princ "\n============================================\n")
;(setq Sx2 (sin (3.1415927)))
;度度量如須運算用小括弧刮起來;否則純度度量(如上 sin (3.14.. )不可用刮弧刮起來
(setq Sx2 (sin 3.1415927))
(princ "\nSx2=(sin (3.1415927))=")(princ sx2)
(princ "\n============================================\n")
(setq s4 (sin (/ 1.57079635 1)))
(princ "\nPI=")(princ pi)
(princ "\ns4=(sin (1.57079635))=")(princ s4)
(prin1)
)
沒有留言:
張貼留言