首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

为什么a 不能把值传递给b?解决思路

2012-02-13 
为什么a 不能把值传递给b?function TForm1.atob(a, b: string):integerbeginb:aresult:1end使用:var

为什么a 不能把值传递给b?
function TForm1.atob(a, b: string):integer;
begin
  b:=a;
  result:=1;
end;

使用:
var s1,s2:stirng;
begin
  s1:='nihao';  
  atob(s1,s2);
  showmessage(s2);//为什么得不到正确的结果'nihao'?
end;

[解决办法]
atob(var a,b:string)
[解决办法]
function TForm1.atob(a: string; var b: string):integer;

热点排行