//StrFmt、StrLFmt: 针对 PChar 的格式化函数
var
buf: array[0..255] of Char;
p: PChar;
begin
p := StrFmt(buf, '%d, %d', [123, MaxInt]);
ShowMessage(buf); {123, 2147483647}
ShowMessage(p); {123, 2147483647}
p := StrLFmt(buf, 9, '%d, %d', [123, MaxInt]);
ShowMessage(buf); {123, 2147}
ShowMessage(p); {123, 2147}
end;
var
buf: array[0..255] of Char;
p: PChar;
begin
p := StrFmt(buf, '%d, %d', [123, MaxInt]);
ShowMessage(buf); {123, 2147483647}
ShowMessage(p); {123, 2147483647}
p := StrLFmt(buf, 9, '%d, %d', [123, MaxInt]);
ShowMessage(buf); {123, 2147}
ShowMessage(p); {123, 2147}
end;