MATH FUNCTIONS In addition to the four basic arithmetic functions, LISP has many of the mathematical functions you might expect in a programming language. The list includes trigonometric, logarithmic, logical, and bit manipulation functions; one type of function missing is matrix manipulation. For exa...
(getorient [point_list] [string]) Prompts the user to specify an angle (takes into account the SetAngBase command variable). (getkword [string]) Prompts the user to select an option. (getint [string]) Prompts the user to enter an integer value.^...
vla-xx,vlax-xx就记得去查Visual lisp函数,此处按下不表 obj2 (vlax-ename->vla-object ent) ) (setq interpt (vlax-invoke obj1 'intersectwith obj2 0)) (setq pt1 (vlax-curve-getClosestPointTo obj1 pt10 t) pt2 (vlax-curve-getClosestPointTo obj1 pt11 ...
The first element of the list is treated as the name of a function. The rest of the elements are treated as functions parameters. If one of the parameters is another list it is executed using the same principles and the result is passed as a parameter to the original function. That's ...
as List ofLists (98) Tree Functionsin LISP (98) Building Your Tree (100) Adding a ChildNode into a Tree (100) 24.HASH TABLE 103) Creating Hash in LISP (103) Retrieving Itemsfrom Hash Table (104) Adding Items intoHash Table (104) Applying a SpecifiedFunction on Hash Table...
9.6 三角函數 (Trigometric Functions) 常數pi 是π 的浮點表示法。它的精度取決於各家實現。函數 sin、 cos 及tan 分別可以找到正弦、餘弦及正交函數,其中角度以徑度表示: > (let ((x (/ pi 4))) (list (sin x) (cos x) (tan x))) (0.7071067811865475d0 0.7071067811865476d0 1.0d0) ;;; 譯註: ...
(concatenate 'string (subseq word 1) (subseq word 0 1) "ay")) Try it out: > (pig "pig") "igpay" Note that it doesn't work for words beginning with a vowel. This could be fixed with anifconstruct. Exercises 1. Rotate a string n places to the left ...
"cmdecho" . 0)("gridmode" . 0))) ;;; ;;; defun-q is needed by Visual Lisp for functions which redefine themselves. ;;; it is aliased to defun for seamless use with AutoLISP. (defun-q ai_sysvar (vars / savevar pair varname varvalue varlist) (setq varlistnil) ;; place ...
The first element of the list is treated as the name of a function. The rest of the elements are treated as functions parameters. If one of the parameters is another list it is executed using the same principles and the result is passed as a parameter to the original function. That's ...
Multiply upper word Divide Divide unsigned Remainder Remainder unsigned ($mul 'a0 'a1 'a2) ($mulh 'a0 'a1 'a2) ($mulhsu 'a0 'a1 'a2) ($mulhu 'a0 'a1 'a2) ($div 'a0 'a1 'a2) ($divu 'a0 'a1 'a2) ($rem 'a0 'a1 'a2) ($remu 'a0 'a1 'a2) a0 = a1 * a2 a0 ...