What is scope of a variable? (LOLZ)

Answer Posted / lovly

One of the really big pluses with GOSUB/RETURN is that you
can share variables that are neither global nor restricted
to one piece of code.

With or without that functionality, how about a way to
share variables (with memory of course) between only
certain subs/functions? Something like:
(per function/sub)

"STATIC SHARED as integer namespace_name.variable_name =
0" -OR-
"STATIC SHARED namespace_name.variable_name as integer"

Usage would just be: "variable_name" -- no "." or namespace
prefix.

I think that would be a great addition to FB. Thoughts

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of polymorphism in c++?

565


How the virtual functions maintain the call up?

581


How does a copy constructor differs from an overloaded assignment operator?

537


How did c++ get its name?

538


What is c++ in english?

559






How much is c++ certification?

563


What is the use of "new" operator?

638


Define a constructor?

561


Where do I find the current c or c++ standard documents?

562


Where are setjmp and longjmp used in c++?

590


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

521


Can a program run without main?

601


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

585


State the difference between delete and delete[].

550


C is to C++ as 1 is to a) What the heck b) 2 c) 10

616