比如函数的返回值:
function getInit(aa:integer):integer;
begin
if aa=0 then result :='我'
else
result :='你'end;
================================================================
一颗红心向前看,为了革命两茫然,不好意思才囊尽,只能说上一点点。
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
★ ★
★ ★
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
================================================================
function getInit(aa:integer):integer;
begin
if aa=0 then result :='我'
else
result :='你'end;
================================================================
一颗红心向前看,为了革命两茫然,不好意思才囊尽,只能说上一点点。
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
★ ★
★ ★
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
================================================================
begin
d:="nihao"
return d;
end;
begin
d:="nihao"
return d;
end;这个中,return d,d就是返回值
Function mFun(ValueName : ValueType) : Boolean;定义;Function mFun(Str : String);//用String来表示
begin
if Str = 'a' then
Result := True else
Result := False;
end;begin
...
if mFun('b') then...//调用;
end;
function getInit(aa:integer):string;
begin
if aa=0 then result :='我'
else
result :='你'end;