>you should avoid using 'length' as a variable name, and also
'dimscale'
Kent, I sort of agree, in a general way. There's a difference between the two, though, in that length is a "reserved word" in lisp, whereas dimscale is an Acad variable. Using a symbol named dimscale doesn't stomp on the variable:
Command: (setq dimscale 100)
100
Command: (getvar 'dimscale)
48.0
Whereas misusing the lisp function length does do harm:
Command: (setq length 100)
100
Command: (length '(x y z))
; error: bad function: 100
I don't think this would especially matter outside the present function if the variable length is declared local, but nevertheless it's bad practice to redefine built-in functions. I think it will triggger warnings in VLIDE and compiler errors.
Some people think it's confusing to use local variables matching the names of system variables, but personally I don't have a problem with it. It just means that your local variable name is the same as the sysvar:
Command: (setq dimscale (getvar 'dimscale))
48.0