I have written a procedure "toto" that has no arguments, but 4 keywords.
My problem is if I call the procedure with one or more arguments it tells me:
"TOTO: Incorrect number of arguments."
Instead I would like an error message telling me what is the usage of the procedure, something like:
"toto, car=car, bus=bus, train=train, boat=boat"
So I added at the beginning of my procedure the following:
IF N_PARAMS() NE 0 THEN PRINT, "toto, car=car, bus=bus, train=train, boat=boat"
However, because I called the procedure with too many arguments, IDL never enters inside the procedure, and always returns with the insignificant error message:
"TOTO: Incorrect number of arguments."
Does anyone knows how to avoid this error message and print something else when we call a procedure with too many arguments ?
Many thanks in advance
EA
|