mirror of
				https://github.com/ton-blockchain/ton
				synced 2025-03-09 15:40:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			391 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			391 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| global int x, y, z;
 | |
| global (cell, slice) y;
 | |
| global ((int, int) -> int) op;
 | |
| 
 | |
| _ get() {
 | |
|   var t = z + 1;
 | |
|   return x;
 | |
| }
 | |
| 
 | |
| _ pre_next() {
 | |
|   return x + 1;
 | |
| }
 | |
| 
 | |
| () init() impure {
 | |
|   ;; global x;
 | |
|   x = 0;
 | |
| }
 | |
| 
 | |
| int next() impure {
 | |
|   ;; global x;
 | |
|   return x += 1;
 | |
| }
 | |
| 
 | |
| _ set_y(x, w) {
 | |
|   y = (w, x);
 | |
| }
 | |
| 
 | |
| _ get_y() impure {
 | |
|   return y;
 | |
| }
 | |
| 
 | |
| int main(int c) {
 | |
|   init();
 | |
|   c += next();
 | |
|   return c + pre_next();
 | |
| }
 | |
| 
 |