mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-03 23:21:15 +00:00 
			
		
		
		
	
		
			
	
	
		
			17 lines
		
	
	
	
		
			215 B
		
	
	
	
		
			GDScript3
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
	
		
			215 B
		
	
	
	
		
			GDScript3
		
	
	
	
	
	
| 
								 | 
							
								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")
							 |