mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			233 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			233 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
| func test():
 | |
| 	var i = "Hello"
 | |
| 	match i:
 | |
| 		"Hello":
 | |
| 			print("hello")
 | |
| 		"Good bye":
 | |
| 			print("bye")
 | |
| 		_:
 | |
| 			print("default")
 | |
| 
 | |
| 	var j = 25
 | |
| 	match j:
 | |
| 		26:
 | |
| 			print("This won't match")
 | |
| 		_:
 | |
| 			print("This will match")
 | |
| 
 | |
| 	match 0:
 | |
| 		pass
 | 
