Returning Variable from another Tab [SOLVED]

I was wondering how to return a variable from another tab to the main sketch.

I have calculated the altitude of the Arduino using a barometer and all the code is in a second tab. I call the altimeterLoop() and it calculates the value. But now I want to be able to bring the calculated value back into the main sketch.

How could I do this?

Found the mistake, I was declaring the variable I wanted to bring back in the loop();

Once I declared it in the main sketch it worked!

Good. Please edit your post to include SOLVED in the subject line.