Hi
is it possible to get an error when trying to put longer string into smaller one?
var
s1:string[5];
s2:string;
begin
s2:='test_string';
s1:=s2; // <- I would like this to show up an error
end;
I have around 1000 string variable which I changed from string -> string[5]. That means there's more than 1000 lines of code where I do s1:=s2; so I don't wanna create my procedure that would check lengths of strings and change all my code.
Is there a simpler way?
Is there a compiler directive that could handle that?
Any suggestion would be appreciated
Thanx a lot
Tilen
is it possible to get an error when trying to put longer string into smaller one?
var
s1:string[5];
s2:string;
begin
s2:='test_string';
s1:=s2; // <- I would like this to show up an error
end;
I have around 1000 string variable which I changed from string -> string[5]. That means there's more than 1000 lines of code where I do s1:=s2; so I don't wanna create my procedure that would check lengths of strings and change all my code.
Is there a simpler way?
Is there a compiler directive that could handle that?
Any suggestion would be appreciated
Thanx a lot
Tilen