program Lesson6Task3;
var
sLen:Integer;
sSearch,D:String;
mString,sString:String;
intPos,intLen:String;
Choice:Char;
begin
Writeln('Please enter a string or sentence');
Readln(mString);
Writeln('please choose functon');
Writeln('V- View the string');
Writeln('F- find the length of the string');
Writeln('S- search the string');
Writeln('D- Delete part of the string');
Writeln('C- Clear the string');
Choice=:readkey; (*It should be := instead of =: Also, readkey unfound *)
If Choice := 'V' Then (*It should be Choice = 'V'*)
begin
Writeln(mString);
end;
If Choice:= 'F' Then
begin
sLen := Length(mString);
end;
If Choice:= 'S' Then
begin
sSearch := Pos (D)
end;
If Choice:= 'D' Then
begin
Readln(mString);
Writeln('What do you want to delete from the string');
readln(sString);
intpos :=Pos (sString, mString);
intLen :=Length:=(sString);
Delete(mString, intPos, intLen)
end;
If Choice:= 'C' Then
begin
Readln(' ', sLen);
Readln(' ', sSearch);
Readln(' ', mString);
Readln(' ', sString);
Readln(' ', intPos);
Readln(' ', intLen);
end;
Else
Writeln('Please choose one of the funtions');
end.