|
#1
|
|||
|
|||
|
Functions and default parameter values
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 |
|
#2
|
|||
|
|||
|
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
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
NP, glad I could help.
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 5.0 -- good enhancements, but lacking others | dallasfreak2 | AutoPlay Media Studio 5.0 | 6 | 11-02-2004 03:34 PM |
All times are GMT -6. The time now is 02:38 PM.






Linear Mode

