Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Programming (https://www.askmehelpdesk.com/forumdisplay.php?f=437)
-   -   Programming mods and variables (https://www.askmehelpdesk.com/showthread.php?t=374849)

  • Jul 12, 2009, 05:53 PM
    andyhaus1057
    programming mods and variables
    Hi,
    I'm not sure about these. Can you please help?

    a) When a module is executing, what happens when the end of the module is reached?

    b) What statements are able to access a local variable?
  • Jul 12, 2009, 06:05 PM
    Perito

    What language?

    a) Unfortunately, I don't know exactly how to answer this. It depends somewhat on the language. In some languages, a "module" is multiple subroutines, in others, it is just one subroutine. Generally, at the end of a subroutine, local variables that were created on the "stack" are destroyed. Values that are to be passed back are placed in locations where the calling subroutine will be able to retrieve them. The question is too general to answer exactly.

    b. This, again, depends on the programming language.

  • All times are GMT -7. The time now is 09:31 AM.