G
guifuli
Unregistered / Unconfirmed
GUEST, unregistred user!
问题:
function X(p: pchar): Integer;
var
i: Integer;
A: array[0..$FF] of Char;
begin
Result := -1;
for i := 0 to $FF do
A := Char(i);
//use A do something,if Failure then Exit
p := A;
Result := 0;
end;
procedure y;
var
B: array[0..$FF] of Char;
begin
FillChar(B, $100, #0);
if X(B) = 0 then //这里调用上面的函数X,如果为真返回B的值也就是函数X中A,
//但是当A的第一个字节为#0时无法返回,请教诸位大侠怎样返回
//这个指针的值(类型必须用pchar)
//use B do something;
end;
function X(p: pchar): Integer;
var
i: Integer;
A: array[0..$FF] of Char;
begin
Result := -1;
for i := 0 to $FF do
A := Char(i);
//use A do something,if Failure then Exit
p := A;
Result := 0;
end;
procedure y;
var
B: array[0..$FF] of Char;
begin
FillChar(B, $100, #0);
if X(B) = 0 then //这里调用上面的函数X,如果为真返回B的值也就是函数X中A,
//但是当A的第一个字节为#0时无法返回,请教诸位大侠怎样返回
//这个指针的值(类型必须用pchar)
//use B do something;
end;