Interfaces/VBScript

From J Wiki
Jump to navigation Jump to search

VBScript only works with arrays of Variants, i.e. it does not support VT_ARRAY+VT_DOUBLE, only VT_ARRAY+VT_VARIANT. So each double needs to be "boxed", which exactly corresponds to J's boxed array. However, the array can be either nested (list of lists) or rectangular, i.e. Dim A(x,y,z...).

Information.png Get/Set and GetB/SetB are different in using byte array as opposed to BSTR for string type.

Here's a few examples, which should take care of the use cases, with results below.

{

Here's a few examples, which should take care of the use cases, with results below.

Script Result
<<Include(/ex0)>> Setup
<<Include(/ex1)>> <<Include(/res1)>>
<<Include(/ex2)>> <<Include(/res2)>>
<<Include(/ex3)>> <<Include(/res3)>>
<<Include(/exZ)>> Tear Down