version 1.48, 2012/03/22 16:27:11
|
version 1.49, 2012/05/26 10:20:01
|
Line 378 struct Cellpair file_status(Char *c_addr
|
Line 378 struct Cellpair file_status(Char *c_addr
|
return r; |
return r; |
} |
} |
|
|
Cell to_float(Char *c_addr, UCell u, Float *rp) |
Cell to_float(Char *c_addr, UCell u, Float *rp, Char dot) |
{ |
{ |
/* convertible string := <significand>[<exponent>] |
/* convertible string := <significand>[<exponent>] |
<significand> := [<sign>]{<digits>[.<digits0>] | .<digits> } |
<significand> := [<sign>]{<digits>[.<digits0>] | .<digits> } |
Line 415 Cell to_float(Char *c_addr, UCell u, Flo
|
Line 415 Cell to_float(Char *c_addr, UCell u, Flo
|
aftersign: |
aftersign: |
if (s >= send) |
if (s >= send) |
goto exponent; |
goto exponent; |
switch (c=*s) { |
if((c=*s)==dot) { *t++ = '.'; ndots++; s++; goto aftersign; } |
|
switch (c) { |
case '0' ... '9': *t++ = c; ndigits++; s++; goto aftersign; |
case '0' ... '9': *t++ = c; ndigits++; s++; goto aftersign; |
case '.': *t++ = c; ndots++; s++; goto aftersign; |
|
default: goto exponent; |
default: goto exponent; |
} |
} |
exponent: |
exponent: |