Created
August 8, 2015 06:30
-
-
Save tinybike/3ead56b5ea9573651501 to your computer and use it in GitHub Desktop.
Load an array into memory from contract data
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
| # loads an array from contract data | |
| # $a: array | |
| # $n: array length | |
| macro fetch($a, $n): | |
| with $memarray = array($n): | |
| with $i = 0: | |
| while $i < $n: | |
| $memarray[$i] = $a[$i] | |
| $i += 1 | |
| $memarray |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment