procedure TForm1.Button1Click(Sender: TObject); vars1: ShortString; //为兼容老版本而存在s2: string; //长字串,相当于动态字符数组s3: string[10]; //短字串,相当于静态字符数组,代替 ShortString beginShowMessage(IntToStr(SizeOf(s1))); //256ShowMessage(IntToStr(SizeOf(s2))); //4ShowMessage(IntToStr(SizeOf(s3))); //11 end;
转载于:https://www.cnblogs.com/del/archive/2007/12/02/979935.html