Skip to content

Instantly share code, notes, and snippets.

@saibakatar
Created October 18, 2018 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saibakatar/8c96ec556143871cf0727fc4d8f9eeaf to your computer and use it in GitHub Desktop.
Save saibakatar/8c96ec556143871cf0727fc4d8f9eeaf to your computer and use it in GitHub Desktop.
Signed Integer declaration for Scilla
contract Int()
field a: Option Int32 = None {Int32} (*declaring variable a with no value*)
field b: Int32 = Int32 5 (*declaring variable b with a fixed value*)
transition update_value()
(*updating variable a*)
c = Int32 6; (*declaring variable c with fixed value in the transition*)
tmp = Some {Int32} c;
a:= tmp;
(*updating variable b*)
d= Int32 7;
b:= d
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment