procedure StringToShortString(const S: String; var RetVal);
var
L: Integer;
I: Byte;
C: Char;
P: PByte;
B: TBytes;
begin
L := Length(S);
if L > 255 then
raise EShortStringConvertError.Create('Strings longer than 255 characters cannot be converted');
SetLength(B, L);
P := @RetVal;
P^ := L;
Inc(P);
B := TEncoding.Ansi.GetBytes(S);
Move(B[0], P^, L);
end;procedure StringToShortString(const S: String; var RetVal);
var
L: Integer;
I: Byte;
C: Char;
P: PByte;
B: TBytes;
begin
L := Length(S);
if L > 255 then
raise EShortStringConvertError.Create('Strings longer than 255 characters cannot be converted');
SetLength(B, L);
P := @RetVal;
P^ := L;
Inc(P);
B := TEncoding.Ansi.GetBytes(S);
Move(B[0], P^, L);
end; function Fun1(arr: array of const): string;
var
i: Integer;
begin
Result := '';
for i := Low(arr) to High(arr) do
begin
case arr[i].VType of
vtInteger : Result := Result + IntToStr(arr[i].VInteger) + ' ';
vtBoolean : Result := Result + BoolToStr(arr[i].VBoolean, True) + ' ';
vtChar : Result := Result + arr[i].VChar + ' ';
vtExtended : Result := Result + FloatToStr(arr[i].VExtended^) + ' ';
vtString : Result := Result + PShortString(arr[i].VString)^ + ' ';
这里的
arr[i].VType
是什么意思
https://github.com/Safrad/Sx-Library.git 发个好库alibaba/form-render: ???? 跨组件体系的表单渲染引擎 - 通过 JSON Schema 快速生成自定义表单配置界面
https://github.com/alibaba/form-render
https://github.com/EtheaDev/IconFontsImageList @[石家庄]semei 看看 https://blog.csdn.net/pulledup/article/details/103687816 TTreeView完整的枚举和递归算法 https://github.com/casbin4d/Casbin4D