Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optional parameter in function
#4
Not Solved
Another way, using Null or Empty argument:
Code:
Function myfunc(arg1,arg2,arg3,arg4)
If IsNull(arg1) OR IsEmpty(arg1)
      'ignore arg1
Else
      'use arg1
End If
If IsNull(arg2) OR IsEmpty(arg2)
      'ignore arg1
Else
      'use arg1
End If
.....
'Your code is here

End Function

To call your function:
Code:
Dim a
a = myfunc(NULL,arg2,,arg4)
Reply


Messages In This Thread
Optional parameter in function - by amit25007 - 08-19-2015, 10:22 AM
RE: Optional parameter in function - by amit25007 - 08-19-2015, 05:10 PM
RE: Optional parameter in function - by cuongtv - 08-20-2015, 10:26 AM
RE: Optional parameter in function - by vinod123 - 01-06-2016, 10:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Is there a way to create dynamic objects by declaring the type of object as parameter lotos 3 2,181 11-08-2017, 11:15 PM
Last Post: lotos
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,967 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  impossible to pass a parameter of type 64 bytes in a webservices dosreis 0 2,160 06-21-2013, 01:55 AM
Last Post: dosreis
  Test Parameter hadar 0 1,850 02-11-2013, 01:27 AM
Last Post: hadar
  optional parameters Ishul 5 8,191 04-03-2012, 11:18 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)