是否有在线服务来计算开放和结束括号?

Saa*_*iko 6 syntax-error

是否有人熟悉在线服务,我可以粘贴一些代码,它告诉我

  1. 如果我的所有支架都到位 - 没有丢失/添加一个关闭括号?
  2. 根据语言语法 - 代码是对的吗?

    • 我同意大多数编辑的配色方案/或者给你一个错误.这个特定的不是:-)它被称为:记事本^^ - 我使用了很多,但仍然.如果存在这样的服务 - 无论您使用什么IDE,它都可以提供帮助.如果您想要检查一段代码 - 并且不想打开IDE

示例('3'部分有一个缺少的括号):

IF( OR( ISBLANK(BillingCountry), UPPER(BillingCountry) = 'UNITED STATES' , UPPER(BillingCountry) = 'USA', UPPER(BillingCountry) = 'US', UPPER(BillingCountry) = 'U.S.', UPPER(BillingCountry) = 'U.S.A.' ), 

IF ( OR( BillingState = 'CA' , BillingState = 'WA' , BillingState = 'OR' , BillingState = 'ID' , BillingState = 'NV' , BillingState = 'MT' , BillingState = 'WY' , BillingState = 'CO' , BillingState = 'UT' , BillingState = 'AZ' , BillingState = 'NM'), 
"1 - West" 
,
IF ( OR( BillingState = 'IL' , BillingState = 'ND' , BillingState = 'SD' , BillingState = 'MI' , BillingState = 'NE' , BillingState = 'IA' , BillingState = 'KS' , BillingState = 'OK' , BillingState = 'TX' , BillingState = 'IL' , BillingState = 'MN' , BillingState = 'OH' , BillingState = 'WI' , BillingState = 'IN' , BillingState = 'CANADA'), 
"2 - MIDWEST" 
, 
IF( OR( BillingState = 'NY' , BillingState = 'ME' , BillingState = 'NH' , BillingState = 'MA' , BillingState = 'RI' , BillingState = 'CT' , BillingState = 'NJ' , BillingState = 'DE' , BillingState = 'D.C.' , BillingState = 'VA' , BillingState = 'WVA' , BillingState = 'NC' , BillingState = 'SC' , BillingState = 'GA' , BillingState = 'FL' , BillingState = 'VT' , BillingState = 'PA' , BillingState = 'MD' , BillingState = 'KY' , BillingState = 'TN' , BillingState = 'AR' , BillingState = 'AL' , BillingState = 'MS' , BillingState = 'LS'), 
"3 - East" 
, 
"Unknown" ) )
, 
IF( LEN(BillingCountry) > 0, "4 - International", "Unknown") 
)
Run Code Online (Sandbox Code Playgroud)

Mih*_*hai 8

这可能对ideone.com有所帮助。但是您可以只安装Notepad ++


Avi*_*vik 5

这个网站可能有助于满足第一点:http : //www.balancebraces.com/

本网站提供了检查大括号:{}、括号:()、方括号:[] 和标签:<> 的选项,并为它们着色以便于识别。