**Detailed Explanation of AutoLISP Functions**
AutoLISP provides a wide range of built-in functions that allow users to perform various operations within the AutoCAD environment. These functions can be called by using their names (case-insensitive) as the first element in a list, followed by any required arguments. This chapter presents all the basic AutoLISP functions in alphabetical order, making it easier for users to locate and understand them. Many of these functions are standard in the LISP programming language, while others are specifically designed for use with AutoCAD to enhance interaction with its graphical interface.
One important system variable in AutoLISP is **FLATLAND**, which controls compatibility between different versions of AutoCAD. When FLATLAND is set to 0, AutoLISP uses the enhanced 3D capabilities introduced in newer versions of AutoCAD. If FLATLAND is set to a non-zero value, the functions behave as they did in AutoLISP version 9, ensuring backward compatibility. The following functions are affected by the FLATLAND setting:
- DISTANCE
- GRREAD
- POLAR
- ENTGET
- INITGET
- TBLNEXT
- GETDIST
- INTERS
- TBLSEARCH
- GETPOINT
- OSNAP
Each function's description includes details on how FLATLAND affects its behavior.
---
**Arithmetic Functions**
1. **(+ number1 number2 ...)**
This function returns the sum of all numbers provided. Numbers can be integers or real values. If all inputs are integers, the result is an integer; otherwise, the result is a real number.
Example:
`(+ 1 2)` returns `3`
`(+ 1 2 3 4.5)` returns `10.5`
`(+ 1 2 3 4.0)` returns `10.0`
2. **(- number1 number2 ...)**
Subtracts the second number from the first. If more than two numbers are given, it subtracts the sum of the remaining numbers from the first. If only one number is provided, it returns the negative of that number.
Example:
`(- 50 40)` returns `10`
`(- 50 40.0 2)` returns `8.0`
`(- 8)` returns `-8`
3. **(* number1 number2 ...)**
Returns the product of all the numbers. It supports both integers and real numbers.
Example:
`(* 2 3)` returns `6`
`(* 2 3 4.0)` returns `24.0`
`(* 3 -4.5)` returns `-13.5`
4. **(/ number1 number2 ...)**
Divides the first number by the second. If multiple numbers are provided, it divides the first by the product of the rest.
Example:
`(/ 100 2)` returns `50`
`(/ 100 2.0)` returns `50.0`
`(/ 100 20.0 2)` returns `2.5`
`(/ 135 360)` returns `0` (integer division)
5. **(= atom1 atom2 ...)**
Compares atoms (numbers or strings) and returns `T` if all are equal, otherwise `nil`.
Example:
`(= 4 4.0)` returns `T`
`(= "me" "me")` returns `T`
`(= 499 499 500)` returns `nil`
6. **(/= atom1 atom2 ...)**
Returns `T` if the first atom is not equal to the second, otherwise `nil`. Only works with two atoms.
Example:
`(/= 10 20)` returns `T`
`(/= "you" "you")` returns `nil`
7. **(< atom1 atom2 ...)**
Returns `T` if the first atom is less than the second. If more than two atoms are provided, each must be less than the next.
Example:
`(< 10 20)` returns `T`
`(< "b" "c")` returns `T`
`(< 2 3 88)` returns `T`
`(< 2 3 4 4)` returns `nil`
8. **(<= atom1 atom2 ...)**
Returns `T` if the first atom is less than or equal to the second. For multiple atoms, each must be less than or equal to the next.
Example:
`(<= 10 20)` returns `T`
`(<= "b" "b")` returns `T`
`(<= 2 9 9)` returns `T`
`(<= 2 9 4 5)` returns `nil`
9. **(> atom1 atom2 ...)**
Returns `T` if the first atom is greater than the second. If more than two atoms are provided, each must be greater than the next.
Example:
`(> 120 17)` returns `T`
`(> "c" "b")` returns `T`
`(> 3.5 1792)` returns `nil`
`(> 77 4 2)` returns `T`
`(> 77 4 4)` returns `nil`
High Frequency Power Supply Transformer
EE 30 abb transformer,RM6 frequency transformer,ETD44 power transformer,EFD20 high frequency transformer
IHUA INDUSTRIES CO.,LTD. , https://www.ihuagroup.com