answersLogoWhite

0

Global variables are accessible to any code making it much more difficult to determine when and where a global is being modified. They can also lead to data-races whenever two threads try to write to the same global at the same time, or one tries to read the global while another is modifying it. The more complex the global the greater the risk.

Globals are not necessarily bad provided they are thread-safe and genuinely represent a truly global concept. If not, use a local variable instead.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

How do you avoid bugs in VB 6.0?

There is no simple answer to that. It is very difficult to avoid bugs in programming. If you can write perfect code, then you won't get any bugs. However, even very experienced programmers make mistakes in their code which result in bugs. In a small and simple program, it is not difficult to avoid bugs, but if you are writing a complex system, it is much more difficult. Following good design and planning of your system will reduce the amounts of bugs you will get.


Is bed bugs like craps?

Yes, they are very similar in their behavious, once you have bed bugs, they are also difficult to get rid of.


How many fans does Bugs Bunny have?

Bugs Bunny is known world wide and it would by difficult to quantify exactly how many fans he has .


Why do bugs hate smoke?

Bugs hate smoke because it can irritate their sensitive respiratory systems, making it difficult for them to breathe and survive.


What are the three variables for milkweed-bug hatching experiments?

The three variables for milkweed-bug hatching experiments are typically temperature, humidity, and light exposure. These variables can affect the rate of hatching, development, and overall survival of milkweed bugs.


Do bed bugs bite dogs?

It is possible, but uncommon, as bed bugs do not like fur. It makes it very difficult for them to move around, as they do not have "sticky pads" on their feet.


Do green bed bugs exist and how can they be identified and treated?

Green bed bugs do not exist. Bed bugs are typically reddish-brown in color. They can be identified by their small size, oval shape, and flat bodies. Treatment for bed bugs usually involves professional pest control services, as they are difficult to eradicate on your own.


What were the geographical conditions that made building the Panama canal difficult?

The landscape was very difficult by means of digging. Another big issue was the bugs (mosquitoes) were everywhere and all over workers.


What are Bugs Bunny personality traits?

He's an in-your-face smart-alec with a sharp tongue and a penchant for making things difficult for others.


What are some examples of bugs that look like sand?

Some examples of bugs that look like sand include sand fleas, sand flies, and sand beetles. These insects have evolved to blend in with their sandy environments, making them difficult to spot.


Can bed bugs survive and thrive in wooden furniture?

Yes, bed bugs can survive and thrive in wooden furniture because they can hide in cracks and crevices, making it difficult to eliminate them completely. Regular inspection and treatment are necessary to prevent infestations.


What are the characteristics of very tiny bugs that jump?

Tiny bugs that jump, such as fleas or springtails, typically have small bodies and powerful hind legs that allow them to propel themselves through the air. They are often quick and agile, making them difficult to catch or control. These bugs are usually found in moist environments and can be a nuisance to humans and pets.