SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Set limit for string

You can set limit for the string, when you define a variable of string type. But it will variable of ShortString type, if you will set a limitation for the string.

procedure TForm1.Button1Click(Sender: TObject);
var
  MyStr: string[60];
begin
  MyStr:='This string must contain not more 60 symbols';
  Label1.Caption:=MyStr;
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes