Call a function: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 4,401: Line 4,401:


// The parameter list is flexible, allowing any amount of variable to be passed in.
// The parameter list is flexible, allowing any amount of variable to be passed in.
// These can be accessed with the keyword `the params`
// These can be accessed with the keyword `the parameterList`
// The specified parameters only limits to named parameters
// The specified parameters only limits to named parameters
// The first item of `the params` is the function name
put TwoArgFn("variable", (3, 4), "hello") into _
put TwoArgFn("variable", (3, 4), "hello") into _


function TwoArgFn arg1, arg2
function TwoArgFn arg1, arg2
put "2 argument function: arg1 = " & arg1 & "; arg2 = " & arg2
put "2 argument function: arg1 = " & arg1 & "; arg2 = " & arg2
put "Parameters = " & the params
put "Parameters = " & the parameterList
end TwoArgFn</lang>
end TwoArgFn</lang>