Compiler syntax check improvment

Hi,
this missing + goes trough compiler and result of s2 is '22.10.';

var
  s,s2: string;
begin
    s := '20201022';
    s2 := copy(s,7,2)+'.'+copy(s,5,2)+'.'copy(s,1,2)   
end;

Hi Mika,
"Unfortunately" this is a valid syntax for the TMS Scripter Pascal language. The ; character is optional between statements, thus the mentioned script is equivalent to:

var
  s,s2: string;
begin
    s := '20201022';
    s2 := copy(s,7,2)+'.'+copy(s,5,2)+'.'
    copy(s,1,2)   
end;

So it's working as "expected" (as TMS Scripter expects, not as you would expect, I understand that).

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.