고개발 Master
autoLisp 데이터 타입
Integers
2^32 까지 표현 되고, 최대값이 연산되었을땐 음수 값으로 순환됩니다.
(princ 2147483647)
(princ 2147483648) //2.14748e+009
(princ 2147483648) //2.14748e+009
(princ (+ 2147483646 3))//-2147483647
REAL
소수점을 포함하는 숫자를 표현합니다.
(setq a 21.1)
(princ (type a) ) // REAL
String
문자열을 표현하는 데이터 타입입니다.
(setq a “문자열”)
(princ (type a) ) // STR
Symbols
리습안의 다른 데이터 타입입니다.
일련의 문자, 숫자 및 특수 문자를 뜻함.
—————————————————————————-
(setq a 123 r 3.45 s “Hello!” x ‘(a b c))
(setq f (open “name” “r”))
(princ (type ‘a) ) ;returns SYM
(princ (type a)) ;returns INT
(princ (type f)) ;returns FILE
(princ (type r)) ;returns REAL
(princ (type s)) ;returns STR
(princ (type x)) ;returns LIST
(princ (type +)) ;returns SUBR
(princ (type nil)) ;returns nil