[Pas2js] Pas2js 0.9.20

Michael Van Canneyt michael at freepascal.org
Sat May 12 09:43:22 CEST 2018



On Sat, 12 May 2018, Ryan Joseph wrote:

>
>> On May 12, 2018, at 1:59 PM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
>> 
>> typedarray.set(array[, offset])
>
> I also wanted to note that every single dynamic array we pass to that parameter (since it should be translated as TJSArray) will need to be type cast. Since the function accepts an un-typed JavaScript array I don’t see how it couldn’t make sense to pass a typed Pascal array. i.e. array of float is equivalent to TJSArray but TJSArray isn’t necessarily equivalent to array of float.

Hence my proposal to add overloads
_set (arr : Array of BaseType);
_set (arr : Array of BaseType; aOffset :NativeInt);
to each descendant.

Michael.


More information about the Pas2js mailing list