@Anonymous
So... where's the list where you wish to append or vl-remove items???
PLEASE try to use subjects/titles that relate to your question!
Your title refers to a completely different 'problem' 
Anyway,
@Kent1Cooper wrote:
@Anonymous wrote:
....(command "pline" a b c d "")
suppose the values in setq c and setq d is zero or nil, then (command "pline" a b c d) will be error. so, i have to remove c and d (because its value is nil) from the list by checking its value and make the command as (command "pline" a b ""). so, how can i make this? ....
Assuming constructing those things correctly as others have pointed out....
If you can rely on what's in all those variables to always be either a point list [a list of 2 or 3 numbers] or nil, and never anything else [such as a single number -- your zero example -- or text, or something], then you could do this:
(command "_.pline"); leaves you in the command awaiting input
(if a (command a)); feed to PLINE only if it exists [for each]
(if b (command b))
(if c (command c))
(if d (command d))
(command ""); finish Polyline
If any of them ever contain something else, it will cause an error because it will be fed to the PLINE command but will not be acceptable input, or if it is, it will be something like text that is viable for designating an option, and then very likely the next input won't be appropriate for that option. It would be possible to check not only whether those variables exist but also whether they represent points, with some additional code.
IF the above is true, you might even get away with:
(command "_pline" a b (if c c) (if d d) (if d nil))
Note: if not set, each if reads as nil. (ending the pline command) Any extra nil doesn't break the code (in my simple quick test anyway), but you do need 1 nil to end the pline if all variables are set, so therefor i added an extra (if d nil).