Editor program, partially completed. program editor; var text, command, new, pform: string; ptr: integer; begin writeln('Line Editor'); text := ''; ptr := 0; command := ''; while command <> 'q' do begin writeln('Command?'); readln(command); if command = 'i' then begin writeln('Insert what?'); readln(new); text := copy(text,1,ptr-1) + new + copy(text,ptr, length(text)-ptr+1); pform := copy(text,1,ptr-1) + '*' + copy(text,ptr, length(text)-ptr+1); writeln(pform); end; if command = 'p' then begin writeln('Enter Pointer Value'); readln(ptr); pform := copy(text,1,ptr-1) + '*' + copy(text,ptr, length(text)-ptr+1); writeln(pform); end; if command = 'd' then begin writeln('Delete Code'); end; if command = 's' then begin writeln('Space Code'); end; if command = 'c' then begin writeln('Change Code'); end; end; writeln('End Line Editor'); readln; end. Sample output: >Line Editor >Command? Insert what? *hello >Command? Insert what? *say hello >Command?

Enter Pointer Value <7 >say he*llo >Command? Insert what? < wants je >say he* wants jello >Command? End Line Editor