SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How do i declare function with optional arguments?

    Hello all,

    I could find how to declare a function with optional arguments..

    Thanks ahead, Gad.

  2. #2
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do i declare function with optional argume

    It's limitataion in VB script, you can't decalre a function with optional arguments.

    But there is a workaround for this, search this forum you will get answer.

  3. #3
    Senior Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    593
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do i declare function with optional arguments?

    You cannot. You can find a work around, in a way that you could supply values that mean nothing and filter it inside the function.
    Vengat Ramanan.R

  4. #4
    Junior Member
    Join Date
    May 2007
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do i declare function with optional arguments?

    Well, Currently im using Vengat work around so i guess ill just stick with it..
    Thank you for your time Vegnat and TReddy.

  5. #5
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do i declare function with optional argume

    The "solutions" I have seen use variations on one of the following:

    1. Pass an array, which can hold a variable number of variant values.

    2. Pass a Dictionary object that can hold a variable number of variant values.

    Both though require some mechanism to define each parameter, its position, its meaning, etc. between the calling and called function. All these approaches are cumbersome IMO.

    But you can experiment with these ideas.

    -Hope this helps, Terry Horwath

  6. #6
    Junior Member
    Join Date
    May 2007
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do i declare function with optional argume

    Thanks, ill do it.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 7.14%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:47 PM.

Copyright BetaSoft Inc.