Skip to content

Instantly share code, notes, and snippets.

@tinybike
Created August 8, 2015 06:14
Show Gist options
  • Select an option

  • Save tinybike/86390a15f87c98e07378 to your computer and use it in GitHub Desktop.

Select an option

Save tinybike/86390a15f87c98e07378 to your computer and use it in GitHub Desktop.
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