mirror of
https://github.com/Valeh2012/PersonalVotingMachine
synced 2024-11-23 09:41:01 +02:00
23 lines
499 B
Plaintext
23 lines
499 B
Plaintext
|
|
||
|
proc main
|
||
|
if print(0)
|
||
|
print(123)
|
||
|
else
|
||
|
print(999)
|
||
|
endif
|
||
|
print(test(777))
|
||
|
print(add(3,4))
|
||
|
endproc
|
||
|
|
||
|
# expects one argument, which has to be removed with the pop function
|
||
|
# procedures always have to ensure to remove their args
|
||
|
# test expects one argument a(1)
|
||
|
proc test
|
||
|
locals 1
|
||
|
a(2, a(1)) # store a(1) in local var a(2)
|
||
|
print(a(2)) # print local var a(2)
|
||
|
print(a(1)) # print argument a(1)
|
||
|
print(a(0)) # print return value a(0) (should be zero)
|
||
|
return(888)
|
||
|
endproc
|