Page 1 of 1

Is eValid able to call script by themselves

PostPosted: Thu Jul 16, 2020 10:55 am
by JCopage
Greetings.

Can eValid scripts call themselves?

Just wondering if you ever implemented that kind of thing?

Thanks

Re: Is eValid able to call script by themselves

PostPosted: Fri Jul 17, 2020 3:23 pm
by eValid
JCopage wrote:Greetings.

Can eValid scripts call themselves?

Just wondering if you ever implemented that kind of thing?

Thanks


Thanks for posting JCopage.

You're referring to "first level recursion" and the eValid solution does NOT permit recursion.

If you have a script "A" the usual technique for implementing recursive invocation of a method is to have this command within "A":

CallScript "A"

To prevent this (for reasons described below), a specific reference by "A" to a script also called "A" is tagged as illegal.

The reason is that the actual script interpretation process in eValid is in two stages:

There is a script pre-scan that converts it into an internal format and only when that is completed does the second level interpretive engine take over an run the actual script.

This approach has the advantage that only completely correct scripts are ever run -- if there is a syntax error found in the pre-scan then the user is told that and the actual execution is prevented.

The bottom line is: sorry, no recursion.

(However, if "A" calls "B" and "B" calls "A" then no problem, because each script execution is independent of the other.)


-- eValid Support