Home  |  IT Zone  |  Tips / Tricks  |  Did You Know  |  Inspirational  |  Health  |  World Infos  |  Insurance  |  Universities  |  Forex  |  Mathematics  |  Illusions  |  Children Day Quotes  |  Fun / Jokes  |  Decent Quotes  |  Birthday Msgs  |  Good Morning Msgs  |  Good Night Msg  |  Husband Wife Jokes  |  Teacher Students Jokes  |  Insult Jokes  |  Love Quotes  |  Sad Quotes  |  Funny Pics  |  Be Aware  |  Articles  |  Simple Joys of Life 

DIM SHARED, SHARED and COMMON SHARED Statement?

  • DIM SHARED statement is used to declare global variable in main module.
    • Syntax:
      • DIM SHARED variable
        • Eg: 
          • DIM SHARED A

  • SHARED statement is used to declare global variable in sub module. It is used to make the variable accessible which is declared at the module level without passing them as parameters.
    • Syntax:
      • SHARED variable
        • Eg:
          •  SHARED A

  • The COMMON SHARED is a non executable statement that declares global variables for sharing between modules (main program to sub program or function and vice versa).
  • This statement declares the variable as global so that all modules can use this variable.
    • Syntax: COMMON SHARED variable
      • Example:
        • COMMON SHARED A

Share :

Twitter
Back To Top

facebook main

Powered by Blogger.