Created
August 8, 2015 06:14
-
-
Save tinybike/86390a15f87c98e07378 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data stuff[](otherstuff[], numStuff) | |
| event stdout(data) | |
| # prints an array to stdout | |
| # $a: array | |
| # $n: array length | |
| macro log_array($a, $n): | |
| with $i = 0: | |
| while $i < $n: | |
| log(type=stdout, $a[$i]) | |
| $i += 1 | |
| def start(): | |
| self.stuff[0].otherstuff[0] = 4 | |
| self.stuff[0].otherstuff[1] = 5 | |
| self.stuff[0].numStuff = 2 | |
| log_array(self.stuff[0].otherstuff, 2) | |
| log(type=stdout, self.stuff[0].numStuff) | |
| return(1) | |
| def getStuff(id): | |
| return(load(self.stuff[id].otherstuff[0], items=self.stuff[0].numStuff): arr) | |
| def woah(): | |
| return(self.stuff[0].otherstuff[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment