mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-03 17:39:02 +00:00
Now supports function calling
This commit is contained in:
@@ -3,12 +3,19 @@ func add(int a, int b)
|
||||
return a + b
|
||||
}
|
||||
|
||||
func sub(int c, int d)
|
||||
{
|
||||
return add(c, 0 - d)
|
||||
}
|
||||
|
||||
func mul(int e, int f)
|
||||
{
|
||||
return e * f
|
||||
}
|
||||
|
||||
func main()
|
||||
{
|
||||
int a
|
||||
a = 5 + 2
|
||||
int g = mul(add(7, 5), sub(5, 3))
|
||||
|
||||
int b = 6 + 1
|
||||
|
||||
return a + b
|
||||
return g
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user