Caused by:
A bit of battery physics and chemistry.
The electrolyte in batteries is potassium hydroxide, or KOH. This is actually a quite corrosive substance. It usually stays safely inside the batteries but under certain circumstances it can leak. Batteries are designed to permit outgassing, which usually occurs when the battery is reverse charged (a condition that often occurs in battery packs containing several cells connected in series, when they are deep discharged.) Sometimes, however, it appears that old batteries can also leak electrolyte, in the form of gaseous KOH.
The good news is that KOH readily reacts with carbon dioxide (CO2) found in air, forming harmless potassium carbonate (2KOH + CO2 => K2CO3 + H2O). No wonder you see all that white crystalline stuff near battery terminals! This stuff can easily be removed with a small brush, and it rarely leaves behind any residue. Sometimes the crystal appears wet; as far as I know, that's ordinary water that's bound to crystalline K2CO3.
The bad news is that air contains very little CO2. When there's only a limited amount of air available (such as when your calculator is safely stored inside a box or case for a long period of time) eventually all CO2 will be exhausted. If additional KOH is leaked from the batteries, it'll do its corrosive best, attacking both metal and plastic parts inside your calculator. The result is often black corrosion, appearing for instance on solder joints; this type of corrosion is especially difficult to deal with because when it mixes with solder, it makes the contaminated solder difficult to melt or remove. Because gaseous KOH can penetrate just about anywhere, corrosion can appear in insulated wires, even inside chips that are not in hermetically sealed cases.
So much about black stuff and white stuff... what about the blue or green stuff? That stuff, believe it or not, has almost nothing to do with batteries; it has everything to do with the presence of voltage (whether from a battery or another source) in a damp environment (that's my theory anyway.) If there's a sufficient amount of moisture in the air, electrolysis can take place involving any circuit traces, wires, or leads that are connected to a voltage source. Most circuit traces are made of copper; the result of the reactions taking place here is probably copper oxide (with its characteristic greenish-blue color), and perhaps other copper compounds. This problem can be compounded by the fact that a byproduct of the reaction between the KOH electrolyte and carbon dioxide in the air is water; so the small amount of air trapped inside a calculator can get quite damp even if the machine is stored in a dry, but not well ventilated place.
Conclusion: leaving a power source inside an electronic device for very long periods of time is probably not a smart idea. If the voltage source is a dying NiCd battery that can release corrosive gases, or if the device in question is stored in a humid environment such as a damp basement or an unheated storage room, things get worse. Vintage calculators can be worth a lot of money these days, so it pays to take good care of them!
-The Intermet :thumbup:
Cliff Notes:
It's science MAN!
Solve:
Buy anti-corrosive spray available at a Pep Boys near you! (or any automotive place)