Changeset 255


Ignore:
Timestamp:
Nov 28, 2002, 9:00:31 PM (18 years ago)
Author:
luba
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/rf_int.hh

    r253 r255  
    4646  if (expr.get_last() - q < 10){
    4747    for (; p >= q; p--) {
    48       n += (((rf_char*)p)->to_byte().n + 48 )*k;
     48      n += (((rf_char*)p)->to_byte().n - 48)*k;
    4949      k *= 10;
    5050       
     
    5757     
    5858    for (; p > q ; p--) {
    59       n += (((rf_char*)p)->to_byte().n + 48 )*k;
     59      n += (((rf_char*)p)->to_byte().n - 48)*k;
    6060      k *= 10;
    6161       
     
    6767        error ( Word2Expr("RF-INT") + "Size limit exceeded");
    6868
    69     n += (((rf_char*)q)->to_byte().n + 48 )*k;
     69    n += (((rf_char*)q)->to_byte().n - 48)*k;
    7070  };
    7171
     
    9090inline Term* rf_int::to_rf_chars(Term* t) const {
    9191  /*
    92   if (n < 0)
     92  if (n < 0) {
    9393    *t = rf_char("-");
    9494    t++;
     95  };
    9596  uintptr_t k = 1;
    9697  intptr_t num = n / 10;
     
    103104  while ( k ) {
    104105    m = (n / k) % 10;
    105     *t = rf_char(m + 48);
     106    *t = rf_char(m - 48);
    106107    k /= 10;
    107108    t++;
Note: See TracChangeset for help on using the changeset viewer.