Created
October 18, 2018 07:09
-
-
Save saibakatar/969321353d4b6116b5ccb04233e460c3 to your computer and use it in GitHub Desktop.
Block Number declaration in 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 Block() | |
field a: Option BNum = None {BNum} (*declaring variable a with no value*) | |
field b : BNum = BNum 5 (*declaring variable b with some fixed value*) | |
transition update_value() | |
(*updating variable a*) | |
c = BNum 6; (*declaring variable c with fixed value in the transition*) | |
tmp = Some {BNum} c; | |
a:= tmp; | |
(*updating variable b*) | |
d= BNum 7; (*declaring variable d in the transition*) | |
b:= d | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment