B4X:
			
		
		
		    Dim x As Int = 2
    Select Case x
        Case 1
            Dim WhatString As String
            WhatString = "Hello"
        Case 2
            WhatString = "Hi"
            Log(":" & WhatString)
    End SelectThis does not cause any errors. When compiled is the WhatString declared for Case 2? i spotted this in my codes without warning.
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		 
 
		 
	 
 
		 
 
		 
 
		 
 
		