anchor.diff:  io_to_decimal(Val,Len,0) ->         %% use fixed point arithmetic with implicit scaling factor
       io_to_integer(Val,Len,0);
   io_to_decimal(Val,Len,Prec) ->
  -    case Val of
  +    case lists:delete(?THOUSAND_SEP,Val) of
           [$-|Positive] -> Sign = [$-];
           Positive -> Sign = []
       end,
  
positive.code: io_to_integer(Val,Len,Prec) when is_binary(Val) ->
      io_to_integer(binary_to_list(Val),Len,Prec);
  io_to_integer(Val,Len,Prec) ->
      Value = try  list_to_integer(Val)
          catch _:_ -> 
              try erlang:round(list_to_float(Val))
              catch _:_ ->  
  
negative.code: string_to_io(Val) ->
      list_to_binary(lists:flatten(io_lib:format("~tp",[Val]))).      %% "\"~tp\""
  
  -ifdef (USE_THOUSAND_SEP).
  integer_to_io(Val) ->
      list_to_binary(lists:foldl(fun integer_filter/2,[],lists:reverse(integer_to_list(Val)))).
  
  integer_filter($-,Acc) -> [$-|Acc];
  integer_filter(D,Acc) -> 
      case (length(Acc)+1) rem 4 of
          0 ->    [D,?THOUSAND_SEP|Acc];
          _ ->    [D|Acc]
      end.
  -else.
  integer_to_io(Val) ->
      list_to_binary(integer_to_list(Val)).
  -endif.
  
  %% ----- Helper Functions ---------------------------------------------
  
  