Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem dealing with arrays in VBScript

$
0
0
Hi orudge,

Thanks for your kind words!

When it comes to running existing VBScript code that relies on certain features of classic ActiveX embedding, ClearScript is definitely missing a few things. It was originally designed to make it easy to add scripts to existing hosts, not vice versa :)

Nevertheless, native array marshaling is something we're investigating as a global option, similar to WindowsScriptEngineFlags.MarshalDecimalAsCurrency. Do you think that would suffice?

The second part of your question deals with methods that have output parameters. ClearScript provides a way to invoke such methods from script code; there's a sample on the home page. Unfortunately it requires the use of ClearScript-specific "host variable" objects.

It might be possible to work around both issues with a translation layer. For example, if a script function takes a script array, call it through a wrapper that knows how to convert host arrays. If you must provide a host API that supports VBScript's ByRef semantics, create a VBScript pass-through that knows how to invoke the appropriate method using host variables.

Would something like that be feasible?

Cheers!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images