# (eq statement1 statement2) [GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md) <a id="165"></a> ## (eq statement1 statement2) --- Determine whether two expressions are bound to the same symbol. --- This function determines whether two expressions are bound to the same symbol. If so, **eq** returns T; if not, eq returns nil. ### Examples | Code | Comments | | --- | --- | | (setq s1 '(1 2 3)) | Create symbol s1. | | (setq s2 '(1 2 3)) | Create symbol s2. | | (setq s3 s2) | Bind s2 to s3. | | (**eq** s1 s3) | nil because s1 and s3 are not the same list. | | (**eq** s3 s2) | T because s3 and s2 are the same list. | **NOTE** The **eq** function is not the same as the [\= (equal to operator)](%28-%20item1%20item2%20...%29%20%28Equal%20to%20operator%29.md) and equal(equal statement1 statement2 \[tolerance\])(IDR\_166)functions. The **\=** function returns **T** when two *numbers or strings* are equal. The **equal** function returns **T** when two *expressions* are equal. The **eq** function returns **T** when two expressions are bound to the same *symbol*. **Tell me about...** [(boundp item)](IDR_LISP_B138.md) [(setq symbol1 statement1 \[symbol2 statement2\] ...)](%28setq%20symbol1%20statement1%20-symbol2%20statement2-%20...%29.md) [LISP Compatibility](../LISP%20Compatibility.md) [Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md) <a id="holding"></a> ## Other versions with matching text [GstarCAD 2011](../../../../2011/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28eq%20statement1%20statement2%29.md)