add some simple programs
both failing, finally get some work done here
This commit is contained in:
parent
b4fcf6a711
commit
b4630fb501
13
codes/if_called.psol
Normal file
13
codes/if_called.psol
Normal file
@ -0,0 +1,13 @@
|
||||
class Object
|
||||
int itest(int n)
|
||||
if_zero( n - 12)
|
||||
"then".putstring()
|
||||
else
|
||||
"else".putstring()
|
||||
end
|
||||
end
|
||||
|
||||
int main()
|
||||
itest(20)
|
||||
end
|
||||
end
|
10
codes/if_else.psol
Normal file
10
codes/if_else.psol
Normal file
@ -0,0 +1,10 @@
|
||||
class Object
|
||||
int main()
|
||||
int n = 10
|
||||
if_zero( n - 12)
|
||||
"then".putstring()
|
||||
else
|
||||
"else".putstring()
|
||||
end
|
||||
end
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
class Object
|
||||
int main()
|
||||
return 1
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user