anchor.diff:    try erlang:list_to_integer(String) catch error:_Ex -> 0 end.
   
   numValid(E, Num) ->
  -  (Num > 0) and (Num =< lineCount(E)).
  +  (Num > 0) and (Num =< sendRecv(E, lineCount)).
   
   getcmd(E) ->
     L = chomp(io:get_line(prompt())),
  
positive.code:     "q" -> {quit, E};
      "a" -> append(E),
             getcmd(E);
      ",p" -> io:format("~s", [list(E)]),
              getcmd(E);
      "p" -> io:format("~s", [print(E)]),
             getcmd(E);
      "d" -> delete(E),
             getcmd(E);
      _ -> Num = getnum(L),
           NumValid = numValid(E, Num),
           if NumValid ->
                setLineNumber(E, Num),
                getcmd(E);
              true ->
                unknown(),
  
negative.code:   after 2000 -> timeout
    end.
  
  append(Pid) ->
    L = io:get_line(""),
    case L of
  