I am defining a new string type in my pascal code after Program filename and before variables, but it is giving an error 'Begin' expected Str20 found.
Program Input_try_1;
Type Str20 : string[20];
Var f: file of Str20;
x : String;
EOF : Boolean;
begin
EOF := False;
Assign(f,'Dic.txt');
Rewrite(f);
Writeln('When you finish enter <End>');
While EOF = false do
begin
Readln(x);
If x = 'End' then EOF := True
else Write(f,x);
end;
Close(f);
End.
I am expecting that 'Type Str20:string[20]; will not give any errors, and can't understand the problem.