rhai/scripts/function_decl3.rhai

8 lines
177 B
Plaintext
Raw Normal View History

2020-03-16 07:50:12 +01:00
// This script defines a function with many parameters and calls it
fn f(a, b, c, d, e, f) {
a - b * c - d * e - f
}
2020-03-16 07:50:12 +01:00
print(f(100, 5, 2, 9, 6, 32)); // should print 4