Implemented function pointers as parameters
This commit is contained in:
parent
313302b9c8
commit
dd6d1cc16c
5 changed files with 76 additions and 36 deletions
|
@ -1,12 +1,12 @@
|
|||
main() {
|
||||
f(1, 2, 3, 4, 5, 6)
|
||||
f1(1, 2, 3, 4, 5, 6)
|
||||
}
|
||||
|
||||
f(a Int, b Int, c Int, d Int, e Int, f Int) {
|
||||
g(f, e, d, c, b, a)
|
||||
f1(a Int, b Int, c Int, d Int, e Int, f Int) {
|
||||
f2(f, e, d, c, b, a)
|
||||
}
|
||||
|
||||
g(a Int, b Int, c Int, d Int, e Int, f Int) {
|
||||
f2(a Int, b Int, c Int, d Int, e Int, f Int) {
|
||||
assert a == 6
|
||||
assert b == 5
|
||||
assert c == 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue