[scilab-Users] Too complex recursion!(recursion tables are full)

François Vogel fvogelnew1 at free.fr
Mon Mar 22 21:16:13 CET 2010


Eduardo Tarasiuk said on 22/03/2010 17:34:
>
> One of the user functions is really enormous (2500 lines !!:(  )
>
> The program has no recursion at all, and it seems that it is correctly
> written (from the Scilab Syntax point of view).
> When I move an "end" statement (from a for loop) after some lines of
> comments. I receive the following error:
>
> !-error 26
> Too complex recursion!(recursion tables are full)
> at line 1735 of function pc_calc_log called by:
> endfunction

There is still this warning in help for (with the original typo):

"Warning: the number of characters used to define the body of any 
conditionnal instruction (if while for or select/case) must be limited 
to 16k."

This is very old information but it's still true, as anyone can very 
easily check.
Exceeding this limit is catched precisely by what you're seeing. This 
message is certainly not crystal clear for the average user, but well, 
where would the pleasure be otherwise?

> I do not expect of course a complete solution of this problem with such
> general information, even though for me is very strange that a comment
> line causes such a problem.

Your observation is compatible with what I say above.

> Have someone a clue of what may probably be the causes of that. Is any
> limitation in the size, number of lines, etc of a function?

Yes.

> Is this error message happen only when recursion is used or may be
> triggered on some different error.

The recursion error is indeed triggered in the above case (16k limit).

> May this error triggered by the Scilab machine and not by the program?
> Because a parsing error?

Always possible, but I would check and fix the size of your user's 
code first.

Francois



More information about the users mailing list