[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recursive function/procedure



Hi folks,

I did not see anyone tells about this problem:

function AAA, a,b,C=c,D=d
   return, AAA(a, b, C=c, D=d)
end

Creating this function is very stupid. But the problem is not in this
function.
Writing this function is correct, I think. But if you compile this, the
compilator says there is a syntax error:

   return, AAA(a, b, C=c, D=d)
                                 ^
Syntax error.

However, if I do a litle strick:
+remove the two last parameters (c,d)
+compile this function (no error here)
+add the two last parameters (c,d)
+re-compile this function - well, it passes with no error.

Now this function already works very well.
Could you tell me why ? How to avoid this stupid doing ?
Best regards,

Tri.


Tri VU KHAC wrote:

> Hi folks,
> How to write a recursive function/procedure ?
> What are programming problems of this technique in IDL ?
> Thanks for help.
> Best regards,
> Tri