☰
Debian Codegraph
@
0.0.26.git.2024.10.25.85e1d6c0e8-4
/
/
lang
/
interpret_test
/
TestAstFunc2
/
func-math1.txtar
☽
☼
lang/interpret_test/TestAstFunc2/func-math1.txtar
code
plain
raw
GPL-3.0
(C) 2013-2024, James Shubin and the project contributors
debian/copyright
1
-- main.mcl --
2
import "fmt"
3
4
# function statement
5
func sq1($x) {
6
$x + $x
7
#$x + 3
8
#6
9
}
10
11
$x1 = sq1(3) # 3^2 + 4 = 13
12
13
test [fmt.printf("sq1: %d", $x1),] {}
14
-- OUTPUT --
15
Vertex: test[sq1: 6]