Fixed number to decimal parsing, additional tests
This commit is contained in:
parent
648bd3bad0
commit
362af6f7bf
5 changed files with 15 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using csmic;
|
||||
|
@ -217,7 +218,7 @@ Value<out decimal r> (.
|
|||
}
|
||||
.)
|
||||
|
|
||||
number (. r = signum * Convert.ToDecimal(t.val); .)
|
||||
number (. r = signum * decimal.Parse(t.val, NumberStyles.Float); .)
|
||||
|
|
||||
hex (. string hx = t.val.Remove(0,2);
|
||||
try { r = signum * Convert.ToDecimal(Convert.ToInt64(hx, 16)); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue