To offer some food for thought, it is also worth noting that your code could be equivalently written in the following way:
(if (and (setq p (getpoint "\nSpecify start point: "))
(setq q (getpoint p "\nSpecify end point: "))
)
(command "_.line" "_non" (mapcar '+ q '(1 1)) "_non" (mapcar '+ p '(-1 1)) "")
)