fun with setq and set
Posted: Thu Aug 21, 2008 3:54 pm
They just put the second argument into the first argument.
A change from the old setq in .99 I just noticed is you don't need to make the variable before hand.
for example this is valid in .99 but not .98
Set is also a fun little thing that allows you to put in a string to name the variable instead of the variable itself. There are several uses of this one is making or storing variables in a series like armor1-6 without a list. The other thing that it allows you to do is store or pass in variables to use. Like if you want to use the same function but storing in different global variables. (see intInstallDevicePrep in Transcendence.xml for an example)
A change from the old setq in .99 I just noticed is you don't need to make the variable before hand.
for example this is valid in .99 but not .98
Code: Select all
(block nil
(setq bob 9)
bob
)