#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Smile Local and My in suroutines


    Can any one please explain how will the two variables

    local var1
    my var2

    will behave when subroutines are being used
  2. #2
  3. kill 9, $$;
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2001
    Location
    Shanghai, An tSín
    Posts
    6,898
    Rep Power
    3887
    I would recommend reading this article.

    The general rule of thumb is that you should always declare variables with 'my' unless you have a good reason to use something else.

    Comments on this post

    • Laurent_R agrees

IMN logo majestic logo threadwatch logo seochat tools logo