Function optional parameter

DjocOBFa4bAm9lDjocOBFa4bAm9l Member Posts: 6
Hey guys,

I couldn't find optional parameter for function in the doc so i suppose it doesn't exist (?) .
Any of you found any work around to that ?

I want to do something like :
function x(uint number,string32 string = "test") where string would default to " test " if no argument is passed.

I was thinking creating a function with 2 parameter (number,string) where my front end would give " test" if no value is passed by the user but it's quite an ugly work around.

Hope oyu guys can help
Sign In or Register to comment.