anchor.diff:  runcmd(Eed, Command) ->
     {match,[[A,C,E,O], _]} = re:run(Command,"([[:digit:]]*)(,?)([[:digit:]]*)([[:alpha:]+-]?)",[global,{capture,all_but_first,list}]),
   
  -  case {A,C,E,O} of
  -    {_, _, _, "q"} -> {quit, ""};
  -    {A, _, _, "a"} -> append(Eed), {ok, ""};
  -    {A, ",", _, "p"} -> printAll(Eed);
  -    {A, _, E, "p"} -> print(Eed, {A, C, E});
  -    {A, _, _, "d"} -> delete(Eed);
  -    {A, _, _, "+"} -> setLineNumber(Eed, sendRecv(Eed, getLineNumber) + 1);
  -    {A, _, _, "-"} -> setLineNumber(Eed, sendRecv(Eed, getLineNumber) - 1);
  -    {"", _, _, ""} -> setLineNumber(Eed, sendRecv(Eed, getLineNumber) + 1);
  -    {A, _, _, O} -> setLineNumber(Eed, getnum(A))
  +  Range = {A, C, E},
  +
  +  case O of
  +    "q" -> {quit, ""};
  +    "p" -> print(Eed, Range);
  +    "a" -> append(Eed), {ok, ""};
  +    "d" -> delete(Eed);
  +    "+" -> setLineNumber(Eed, sendRecv(Eed, getLineNumber) + 1);
  +    "-" -> setLineNumber(Eed, sendRecv(Eed, getLineNumber) - 1);
  +    _ -> setLineNumber(Eed, Range)
     end.
   
   cmdloop(Eed) ->
  
positive.code: linenumValid(Eed, Num) ->
    (Num > 0) and (Num =< sendRecv(Eed, lineCount)).
  
  setLineNumber(Eed, Num) ->
    NumValid = linenumValid(Eed, Num),
    if NumValid -> sendRecv(Eed, setLineNumber, Num),
  
negative.code: 
  print(Eed, {A, C, E}) ->
    print(Eed, A, C, E).
  print(Eed, "", ",", "") ->
    printAll(Eed);
  print(Eed, "", "", "") ->
    CurLine = sendRecv(Eed, getLineNumber),
    print(Eed, CurLine, CurLine);
  