我想知道这在 Delphi 中是否可行(或者是否有干净的方法):
type
TSomething = record
X, Y : Integer;
end;
GetSomething( x, y )
-> 返回具有这些值的记录。
...然后你有这个函数TSomething
作为参数,你想将它默认为
function Foo( Something : TSomething = GetSomething( 1, 3 );
编译器在这里吐出一个错误,但是我不确定是否有解决方法!
这可以做到吗?