You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to instantiate an array type without also allocating an array. Perhaps allow user to instantiate on the stack a [] object and assign to it manually.
let int[] arr;
arr.size = 5;
arr.ptr = <int*>malloc(5*4);
More complex syntax could also be allowed which lets the user construct it like any other object.
let arr = int[](5, <int*>malloc(5*4));
The text was updated successfully, but these errors were encountered:
It's possible the first case is already workable, but it doesn't initialize the values to anything and is a potential safety issue. If that's true, just work on the second type.
Currently there is no way to instantiate an array type without also allocating an array. Perhaps allow user to instantiate on the stack a [] object and assign to it manually.
More complex syntax could also be allowed which lets the user construct it like any other object.
The text was updated successfully, but these errors were encountered: