mirror of
				https://github.com/Dummi26/mers.git
				synced 2025-10-31 03:45:26 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			390 B
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			390 B
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
| x := if true [10 "my text"] else 10
 | |
| 
 | |
| switch! x {
 | |
|     [int string] [num text] {
 | |
|         num.debug()
 | |
|         text.debug()
 | |
|     }
 | |
|     int num {
 | |
|         println("number:")
 | |
|         num.debug()
 | |
|     }
 | |
| }
 | |
| 
 | |
| text := "12.5"
 | |
| match {
 | |
|     parse_int(text) num println("int: " + num.to_string())
 | |
|     parse_float(text) num println("float: " + num.to_string())
 | |
|     [true] [] println("not a number: " + text)
 | |
| }
 | 
