Skip to content

Instantly share code, notes, and snippets.

Created October 26, 2017 11:17
Show Gist options
  • Save anonymous/631147ce648ee2023046bf04e869d769 to your computer and use it in GitHub Desktop.
Save anonymous/631147ce648ee2023046bf04e869d769 to your computer and use it in GitHub Desktop.
Shared via Pony Playground
use "collections"
use "debug"
struct ArrayWrapper
var array : Array[U8]
new create() =>
array = Array[U8]()
for i in Range(0, 56) do
array.push(0)
end
Debug.out("constructor - array size is " + array.size().string())
actor Main
var array_wrapper : ArrayWrapper
new create(env: Env) =>
array_wrapper = ArrayWrapper
Debug.out("after assignment - array size is " + array_wrapper.array.size().string())
a_call()
be a_call() =>
Debug.out("in behavior - array size is " + array_wrapper.array.size().string())
a_call()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment