Created
October 18, 2018 06:59
-
-
Save saibakatar/8c96ec556143871cf0727fc4d8f9eeaf to your computer and use it in GitHub Desktop.
Signed Integer declaration for Scilla
This file contains 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
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