SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot Imran-Saami's Avatar
    Join Date
    Sep 2004
    Location
    Pakistan-Dubai
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Function inside a Function

    Hi all !

    I'll be thankful if somebody can clear this concept... Its quite beginner level question. but It has become a permanent psychlogical tension for me...

    Can I define a function inside a function. e.g;

    function abc()
    function xyz()
    ....some code.....
    End Function
    End Function

    I googled this but can't find any related topic.
    Please gimme some solution and make my life easy !

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No

    You'll get a syntax error.

  3. #3
    Guru Bullschmidt's Avatar
    Join Date
    Apr 2002
    Location
    USA
    Posts
    524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But of course you can call a function from within a function:

    function abc()
    myvar = xyz()
    abc = myvar
    end function
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •