comparison lib/js/urweb.js @ 1630:4798ad652c94

Stop [read] from raising an exception for invalid [int] strings
author Adam Chlipala <adam@chlipala.net>
date Sun, 04 Dec 2011 15:13:53 -0500
parents 438561303d02
children 747f94ac5fc2
comparison
equal deleted inserted replaced
1629:438561303d02 1630:4798ad652c94
970 } 970 }
971 971
972 if (s == "0") 972 if (s == "0")
973 return s; 973 return s;
974 else 974 else
975 er("Can't parse int: " + s); 975 return {};
976 } 976 }
977 977
978 function pi(s) { 978 function pi(s) {
979 s = trimZeroes(s); 979 s = trimZeroes(s);
980 var r = parseInt(s); 980 var r = parseInt(s);