562 B
562 B
Function Construction
In AVAP™, similar to Python, functions are defined using the keyword def, followed by the function name and its parameters in parentheses. The function definition ends with a colon (:), followed by the block of code that forms the function body, indented with four spaces.
Defining a function in AVAP™
function greet(name){
return()"Hello, " + name + "!")
}
Calling the function
message = greet("World")
addResult(message)
Output
Hello, World!