Is there a way to assign a default value to a parameter in a function definition so that you do not have to enter a value for said parameter when actually calling the function?
Thanks
Professional Software Development Tools
Is there a way to assign a default value to a parameter in a function definition so that you do not have to enter a value for said parameter when actually calling the function?
Thanks
My understanding is that the variable name being passed is a "local" variable. That said, you should be able to do this:
Code:function MyFunction(sFolder) if sFolder == nil then sFolder = "C:\\Program Files\\" end --whatever you need to do here end
Worm,
Thanks for the reply. That seems to work. It's a little different than I'm used to, but it does the job. Thanks
Dave
NP, glad I could help.