easygui.msgbox=("You need "+(3.14*(float(radius)**2) * float(height)) + "gallons of water to fill this不过,我一直收到这个错误:
+ "gallons of waterTypeError: cannot concatenat
我之所以打扰您,是因为我希望用node.JS将字符串转换为浮点数。我有一个从请求中返回的字符串,它看起来是:x,xxx.xxxx (前)。我尝试使用:parseFloat(str),但它返回4。我也在网上找到了Float.valueOf(str),但是我得到了一个ReferenceError: Float is not defined错误。