Call a function: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 4,398:
 
* Running a function requires a keyword such as `put; if no variable is return, put into e.g. _
<lang sensetalk>put TwoArgFn("a variable", (3, 4)) into _
 
// The parameter list is flexible, allowing any amount of variable to be passed in.
Line 4,404:
// The specified parameters only limits to named parameters
// The first item of `the params` is the function name
put TwoArgFn("a variable", (3, 4), "hello") into _
 
function TwoArgFn arg1, arg2
Line 4,412:
 
* A parameter is set to "" if nothing is specified
<lang sensetalk>put ThreeArgFn("a variable", (3, 4)) into _
 
function ThreeArgFn arg1, arg2, arg3
Line 4,426:
set arg1 to 5
end if
put "One agumentargument function; arg1 = " & arg1
end OneArgFn</lang>