Merge pull request #7 from weilinfox/master

bc up up up
This commit is contained in:
Si-Huan 2020-03-05 13:51:03 +08:00 committed by GitHub
commit 2ddf7dd938
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,6 +185,9 @@ def bcMain(com):
com = com.replace("x", "*")
com = com.replace("X", "*")
if (len(com) < 1):
return reportErr(1, "")
#省略乘号的支持
for i in range(1, len(com)-1, 1):
if (com[i] == '(' and (com[i-1].isdigit() or com[i-1] == '.' or com[i-1] == '%' or com[i-1] == ')')):