Differentiating Between Local and Global Variable
- Global variables are accessible by all functions loaded within a document(or drawing).
- Local variables retain their value only as long as the function that defined them is running. After the function finishes running, the local variable values are automatically discarded, and the system reclaims the memory space the variable used.
Using Local Variable in the Program
1 | (defun gp:getPointInput (/ StartPt EndPt HalfWidth) |
The local variables are declared following the slash character
.