Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an online service to count open and closing brackets?

Tags:

syntax-error

Is anyone familiar with an online service where I can paste some code, and it tells me

  1. If all my brackets are in place - Not missing/adding a close bracket?
  2. According the language syntax - that the code is right?

    • I agree that most editors color scheme/and or give you an error. This specific one does not :-) It's called: Notepad ^^ - Which I use a lot, but still. If such a service exists - it can help no matter what IDE you use. If you have a piece of code you want to check - and don't feel like opening the IDE

Example (There is a missing bracket on the '3' part):

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") 
)
like image 950
Saariko Avatar asked Nov 04 '12 07:11

Saariko


1 Answers

This might help ideone.com. But you could just install Notepad++

like image 185
Mihai Avatar answered Oct 21 '22 10:10

Mihai