@Anonymous wrote:
....
Je fais (print a), j'obtiens deux fois le résultat (x,y,z) (x,y,z)
....

Going back to the original message....
Getting the result two times is just how (print) works by itself [read about it and (prin1) and (princ) in the AutoLisp Reference -- it prints to the command line and returns the result to the command line [again] if no file destination is specified, and that return is the second one you see]. If it's used at the end of an AutoLisp routine, the (princ) with no arguments that was suggested is a way to "exit quietly" and not see the second copy of it.
Since there are no (print) functions in the code you posted, I don't understand what it has to do with that -- does the code not work?
By the way, you don't need to supply an empty string [""] as a prompt if you don't want one in a (getpoint) function. Just use (getpoint) without anything about a prompt at all.
Also, in your GDSOLM.lsp code, there are many things you could simplify. For example, in lines like this:
(IF (<= DID 1) (SETQ DEC (STRCAT "000" (ITOA DID))) (SETQ DID DID))
the (SETQ DID DID) part does nothing for you. It is the 'else' expression, i.e. what to do if the test expression fails. But it does nothing to set a variable to itself. You do not need to supply an 'else' expression at all -- you can just leave it to do nothing if the test fails:
(IF (<= DID 1) (SETQ DEC (STRCAT "000" (ITOA DID))))
[Look into the (cond) function for a much more efficient way to set DEC depending on the possible ranges of the value of DID.]
Kent Cooper, AIA