Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-05

TJSFloat32Array casting

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

Did something change? I just tried this and it didn’t work. Casting “arr” to TJSObject didn’t work either. I could swear that used to work a few days ago. Maybe an overload is missing? If TJSArray = TJSObject then should “array of single” = TJSObject?

var
  arr: array of single;
begin
TJSFloat32Array.new(TJSArray(arr)); // Incompatible type arg no. 1: Got "TJSArray", expected “TJSArrayBuffer”
TJSFloat32Array.new(TJSObject(arr)); // Illegal type conversion: "array type" to "class TJSObject"

Regards,
Ryan Joseph

Reply by email

Ryan Joseph
to Ryan Joseph

Sorry, I didn’t intend to post to this list. Please disregard.

Show quoted text 19 lines
On May 20, 2018, at 3:23 PM, Ryan Joseph wrote: Did something change? I just tried this and it didn’t work. Casting “arr” to TJSObject didn’t work either. I could swear that used to work a few days ago. Maybe an overload is missing? If TJSArray = TJSObject then should “array of single” = TJSObject? var arr: array of single; begin TJSFloat32Array.new(TJSArray(arr)); // Incompatible type arg no. 1: Got "TJSArray", expected “TJSArrayBuffer” TJSFloat32Array.new(TJSObject(arr)); // Illegal type conversion: "array type" to "class TJSObject" Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Regards,
Ryan Joseph

Reply by email