Log in

View Full Version : function optional argument ?


bugs7
27th September 2002, 21:35
how one makes that ?
a dummy sample :

testOptional(a)
or
testOptional(a, b)
the 2 calls must work.

function testFacultatif(clip have, clip b) {
Defined(b)? a + b : a
}

It must be possible?

sorry for my poor english.

dividee
28th September 2002, 01:42
Just enclose the parameter name in double quotes in the function definition:
[...]
function testFacultatif(clip have, clip "b") {
[...]

But I think it should be testOptional ;)

bugs7
28th September 2002, 09:01
Cool it's work :)
thx ;)