2023-03-29 00:18:06 +00:00
|
|
|
# Function calls
|
|
|
|
|
|
|
|
A function is called with parenthesis.
|
|
|
|
|
|
|
|
```misti
|
|
|
|
// No parameters: place opening and closing paren
|
|
|
|
debugState()
|
|
|
|
|
|
|
|
// 1 parameter
|
|
|
|
val result = fibonacci(20)
|
|
|
|
|
|
|
|
// 2 or more parameters: separate the parameters with commas
|
|
|
|
val remainder = substract(50, 30)
|
|
|
|
val total = add(60, -30, 90)
|
|
|
|
```
|
|
|
|
|
2023-04-11 02:10:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
```nav
|
|
|
|
[previous]
|
|
|
|
href = "./simple-datatypes.html"
|
|
|
|
title = "Datatypes"
|
|
|
|
|
|
|
|
[next]
|
|
|
|
href = "./operators.html"
|
|
|
|
title = "Operators"
|
|
|
|
```
|