Skip to content

Instantly share code, notes, and snippets.

@nielsAD
Created May 12, 2018 18:34
Show Gist options
  • Save nielsAD/65d4f99a4e00df7804b4f2c3ee94dd61 to your computer and use it in GitHub Desktop.
Save nielsAD/65d4f99a4e00df7804b4f2c3ee94dd61 to your computer and use it in GitHub Desktop.
type
t = record abc: Boolean; end;
function a: array of array of Single;
begin
Result := [[1, 2, 3]];
end;
function t.b: array of array of Single;
begin
Result := [[4, 5, 6]];
end;
type
ma = function: array of array of Single;
mb = function: array of array of Single of object;
var
z: t;
x: ma := Lapify(Natify(@a));
y: mb := Lapify(Natify(@z.b));
begin
WriteLn(SizeOf(Pointer));
WriteLn(x());
WriteLn(y());
end;
8
[[1, 2, 3]]
[[4, 5, 6]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment