Looking for some clarifications on what is taking place in the following code:
(if BLK
(progn
(setq TYP (strcat "\nBlock to Insert: <" BLK "> "))
(setq BLK (if (= (setq CTP (getstring TYP)) "") BLK CTP))
)
(setq BLK (getstring "\nBlock to Insert: "))
)
My take on this:
If the variable BLK is NOT defined then prompt user "Block to Insert: " thus setting the variable BLK to the input. (I think I'm okay with this part)
If variable BLK is defined then prompt user "Block to Insert: <" BLK "> " while displaying BLK's value in <>
The user input at this line is stored in variable TYP. (Here's where I'm not following along). Are we checking to see if BLK and CTP are equal at this point? with the variable CTP being the value of TYP (a text string from previous user input). Can anyone help walk me through this?
Thanks,
Dan