RosettaCodeData/Task/Call-a-function/Phix/call-a-function-3.phix

7 lines
215 B
Plaintext

function myfunction(integer a, string b="default")
return {a,b}
end function
--? myfunction() -- illegal, compile-time error
?myfunction(1) -- displays {1,"default"}
?myfunction(2,"that") -- displays {2,"that"}