From the course: Learning AutoLISP & Visual LISP
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating and using variables - AutoCAD Tutorial
From the course: Learning AutoLISP & Visual LISP
Creating and using variables
- [Male Instructor] In this chapter we're going to learn about variables. Variables are a special character groups that store, in memory, different values. We learned about variables when we first started learning about algebra. X is a variable. In LISP we can create variables to callback at different times. You can create variables that are global to within the CAD drawing or local within the named function. Unlike other programming languages you don't even have to specify that this variable is going to be an integer or this variable is going to be a string. Let's go ahead and create a new defined function. New LISP file. I'm going to name this function and multiply. I'm going to add those LISP parenthesis arguments to the defined function. We'll talk about that in a minute. We're going to create our first variable. I'm going to create a variable using the function, LISP function, called set Q. We're creating, or setting, a variable. We're going to name this variable varied value. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.