[导入]js 浮点运算表达式 精确计算(vb没有这个问题)
var result;
var stack;
//运算表达表转化为逆波兰表达式
function Infix2Postfix(infix)
{
result = "";
stack = new Stacks();
var len=infix.length;
for (var i = 0; i < len; i++)
{
var ch = infix.substring(0,1);
infix = infix.substring(1);
if (ch == '+' || ch == '-')
{
gotOperator(ch, 1);
result += ',';
}
文章来源:http://www.gins.cn/blog/post/174.html
var stack;
//运算表达表转化为逆波兰表达式
function Infix2Postfix(infix)
{
result = "";
stack = new Stacks();
var len=infix.length;
for (var i = 0; i < len; i++)
{
var ch = infix.substring(0,1);
infix = infix.substring(1);
if (ch == '+' || ch == '-')
{
gotOperator(ch, 1);
result += ',';
}
文章来源:http://www.gins.cn/blog/post/174.html