parseManager/test.dms
Ryan Ward 0880687e15 Math within nested functions work as expected
ENTRY MAIN
USING extendedDefine
VERSION 4.1 //The version that nested functions was introduced
[MAIN]{
	// New feature functions inside of functions
	a = hmm(5,1)
	"a = $a$"
	b = hmm(hmm(6+5,hmm(1+5,1 + 1)),5 + sqrt(100))
	"b = $b$"
}
[hmm:function(a,b)]{
	return a+b
}
2019-03-28 14:18:22 -04:00

26 lines
455 B
Plaintext

ENTRY MAIN
USING extendedDefine
VERSION 4.1 //The version that nested functions was introduced
[MAIN]{
// New feature functions inside of functions
a = hmm(5,1)
"a = $a$"
b = hmm(hmm(6+5,hmm(1+5,1 + 1)),5 + sqrt(100))
"b = $b$"
}
[hmm:function(a,b)]{
return a+b
}
// [TEST]{
// newThread("TEST2")
// ::loop::
// print("Hello!")
// sleep(.5)
// GOTO("loop")
// }
// [TEST2]{
// ::loop::
// print("Hi!")
// sleep(1)
// GOTO("loop")
// }