rhai/scripts/function_decl3.rhai

12 lines
219 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
2021-04-17 12:40:16 +02:00
const KEY = 38;
fn f(a, b, c, d, e, f) {
2021-04-17 12:40:16 +02:00
a - b * c - d * e - f + global::KEY
}
2021-04-17 12:40:16 +02:00
print("f() call should be 42:");
2020-05-02 10:23:36 +02:00
print(f(100, 5, 2, 9, 6, 32));