是否可以通过参数按值和稍后在运行时调用相同的函数定义?就像是:
function myfunc(a:string);
begin
a:='abc';
end;
...
later:
b:='cde';
myfunc(b);
caption:=b; //prints 'cde'
...
later:
myfunc(@b);
caption:=b; //prints 'abc'
Run Code Online (Sandbox Code Playgroud)
??
当我在记事本中创建一个文件,包含(示例)字符串1d并保存为unicode文件时,我得到一个包含字节的6字节大小的文件 #255#254#49#0#100#0.
好.现在我需要一个Delphi 6函数,它接受(示例)输入widestring 1d并返回包含#255#254#49#0#100#0(和反之亦然)的字符串.
怎么样?谢谢.d