Archive: Additional Function APE?


28th October 2003 08:03 UTC

Additional Function APE?
Just thought that it may be usefull to extend the "avs-language" with an ape.

So if anyone needs a funtion that actually does not exist, he can code it on his own and it can be added to the general avs code dictionary so we could use it in Superscopes, DM's and so on.


28th October 2003 11:55 UTC

You mean an ape that could add a function and be controled by script or just a single function thing?
The second one is cool, but the first one would kick ass! Dunno if its posible? but what the hell do I know:D.


28th October 2003 13:25 UTC

Okay one example.

If i'd like to introduce a new diffrence function diff(var1,var2) i would have to write an ape which contains the code for this functions.

Internally this function would do the same as:

abs(max(var1,var2)-min(var1,var2))

By installing the ape, diff(var1,var2) should be available in all coding sections and should add a description of itself to the functions help.

Now this example is pretty simple and allmost useless, but just imagine, you could crunch the entire 3D calculation thingie into one function, or introduce completely new ones.

Btw, it should be possible to add multiple functions within one ape so we would just have to publish one extension.ape with our packs.


28th October 2003 21:44 UTC

Not a bad idea at all. Are you saying that it might be possible this way to add arrays etc. to avs?


29th October 2003 06:24 UTC

If there was a way to introduce funtions, arrays would be possible as well - you'd just have to code a setarray and readarray function.

Allowing custom code extension would make anything possible.


29th October 2003 19:03 UTC

I don't think the evallib can be made to accomodate this sort of stuff without a major recoding.