Control Values
Variables are widely used to hold control values that keep track of something. For example, the C statement FOR (X=0; X<5; X++) performs the instructions following the statement within open and closed curly braces ({ and }) five times, and X is keeping track of that number of iterations. X is a variable set to zero (x=0), incremented by 1 (x++) and compared to 5 (x<5). The reason it is less than 5 (<5) is because we started with 0.
The Equals Sign
Variables are usually assigned with an equal sign. Numbers are unquoted; for example: COUNTER = 1 places the digit 1 in the variable COUNTER. Character data (text) requires quotes; for example: PRODUCT = "abc1234". In some languages, the type of data must be declared before it is assigned; for example, in C/C++, the statement INT COUNTER creates a variable that holds only whole numbers (integers).
Local and Global
A local variable is one that is referenced only within the subprogram, function or procedure it was defined in. A global variable can be used by the entire program. See undefined variable and local variable.
![]() | Reproduced with permission from Computer Desktop Encyclopedia. Copyright (c) 1981-2008 The Computer Language Company Inc. All rights reserved. |
Additional Resources
- AVS Flying Images ScreenSaver (exe)
- AVS Flying Images Screensaver allows you to create a nice cascade from your favorite images on your display. Images are floating in different directions with variable speed. Developed in 3D, bright, colorful, and originally designed, our screensavers will give you a lot of exciting emotions. A special feature makes possible...
- Software downloads 2008-08-28
- RTflow (exe)
- RTflow is a free, lightweight dataflow modelling tool for real-time systems. In RTflow, you build your system in a graphical language that is both parallel and deterministic, so that threading and timing problems are completely avoided. You verify your model in a simulator that produces graphs of every variable in...
- Software downloads 2008-08-28
- Arc Wireless Freedom Blade
- As cell phones become the "everything gadget" for more people, companies have begun to cash in on the need for great reception at all times. Wilson Electronics and Wi-Ex have introduced some of our favorite products, and even Sprint Nextel offers an option of its own. A less successful product,...
- Product reviews 2008-08-21
- 2009 Mercedes-Benz C63 AMG
- Photo gallery:2009 Mercedes-Benz C63 AMGMercedes-Benz's smallest U.S. sedan, the C-class, continues to impress us, this time with the sport-tuned 2009 Mercedes-Benz C63 AMG version. We previously reviewed the C300, and found that its updated electronics put to shame the tech in more expensive models from Mercedes-Benz. With the AMG version...
- Product reviews 2008-08-15
- AFCO unfurls three new systems for data center power distribution
- I haven't written much about the providers of data center scale power management systems, but noticed some news from a few weeks back out of a company called AFCO Systems, which has several new power distribution units to tout. AFCO is worth investigating because it...
- Blog posts 2008-08-14
- 2008 Maserati GranTurismo
- Photo gallery:2008 Maserati GranTurismoDriving the 2008 Maserati GranTurismo is like dating an Italian supermodel: her beauty gets you a lot of attention in public and being with her just makes you feel good. Actually, having never even met an Italian supermodel, we're going with a stereotype here, but in many...
- Product reviews 2008-08-13
- Active 3GP Video Converter (exe)
- Active 3GP Video Converter is an all-in-one video converter software to convert video files from one format to another. With Active 3GP Video Converter, you can convert AVI, MPEG, MP4, WMV, DivX, Xvid, ASF, MOV, or VOB to 3GP, 3GPP2 on-the-fly with the outstanding quality. With variable settings and super...
- Software downloads 2008-08-08
- Active AVI Video Converter (exe)
- Active AVI Video Converter is a piece of software designed for the purposes of AVI (AVI,DivX,Xvid) conversion. It lets you easily to convert MPEG, MP4, WMV, Xvid, DivX, ASF, MOV, VOB, etc files to AVI (AVI,DivX,Xvid). With variable settings and super fast converting speed to convert video formats, it is...
- Software downloads 2008-08-08
- Active PSP Video Converter (exe)
- Active PSP Video Converter is a piece of software designed for the purposes of PSP video (MP4,H.264) conversion. Active PSP Video Converter helps you convert AVI, MPEG, MPG, WMV, Xvid, DivX, ASF, MOV, VOB, etc to PSP video (MP4,H.264) formats fast and conveniently with great quality. With variable settings and...
- Software downloads 2008-08-08
- Active SWF Video Converter (exe)
- Active SWF Video Converter is a piece of software designed for the purposes of SWF conversion. Active SWF Video Converter can convert AVI, MPEG, MP4, WMV, DivX, Xvid, ASF, MOV, VOB, etc videos to SWF formats in amazing speed. With variable settings and super fast converting speed to convert video...
- Software downloads 2008-08-08
- Active Video Converter (exe)
- Active Video Converter is an all-in-one video converter software to convert video files from one format to another. Active Video Converter helps you convert AVI, MPEG, MP4, WMV, DivX, Xvid, ASF, MOV, VOB, etc to all popular video formats formats fast and conveniently with great quality. With variable settings and...
- Software downloads 2008-08-08
- Canon Vixia HF11
- Creating a product line where once there was but one, Canon follows up its flash-based, high-definition Vixia HF10 AVCHD camcorder with a slightly more powerful model, the HF11. Like its sibling, the HF11 is a sleek black compact model with a well-rounded feature set, great video, and excellent performance, and...
- Product reviews 2008-08-07
- Why x86 is perfectly fine for now
- Why x86 is perfectly fine for nowAgreed - But demand drives progressEverything you say is true, but the more people who say I want 64bit and I want it now, the more progress you will see in 64bit apps and drivers. If 64bit demand is low, companies will turn...
- Discussion threads 2008-08-05
- Social media and 'green': two fashion trends to avoid
- Social media and 'green': two fashion trends to avoidDell HellHey, Dennis. I really like the folks who are behind the social media effort at Dell, but I can't agree with you more here. I blogged about this precise issue last fall. http://tinyurl.com/DellHellRE: Social media and 'green': two...
- Discussion threads 2008-08-04
- AMC e-Paint (exe)
- AMC e-Paint embodies robust painting functionality. It features a variety of selection tools; antialiased drawing and text; a gallery of image processing filters; multiple document handling; soft brushes; undo; variable magnification; an intuitive user interface; and extensive documentation and tutorials. You'll find e-Paint handy to fine-tune your digital photos; draw...
- Software downloads 2008-08-04
- New version of Centre open source SIS released
- Although I'm happy as a clam with my current student information system, the idea of an open source solution remains attractive. The Miller Group has updated the open source Centre SIS also available in the OpenSUSE server education product. According to the Miller Group website, version...
- Blog posts 2008-08-01
- Sun's fourth quarter solid; Growth in fiscal 2009 remains elusive
- Sun Microsystems on Friday reported fiscal fourth quarter net income of $88 million, or 11 cents a share, on revenue of $3.78 billion, down 1.4 percent from a year ago. Adjusted earnings in the quarter were $275 million, or 35 cents a share. However, Sun sees another tough year ahead....
- Blog posts 2008-08-01
- mdNavMobile (zip)
- mdNavMobile is a waypoint-based GPS navigation solution for the Windows Mobile platform. It can guide you from waypoint to waypoint while keeping you informed of all relevant navigation data. All NMEA-data from a GPS is automatically logged to file so you can 'replay' a trip with variable speed.
- Software downloads 2008-08-01
- Video: Cuil is not cool
- Video: Cuil is not coolI used Cuil and it seems to work very wellI used Cuil and it seems to work very wellTried two searches...Yahoo and Google both returned Cuil did not find anything. It was a url search.RE: Video: Cuil is not coolWell, it didn't find my website bunkerofdoom.com...
- Discussion threads 2008-07-30
- Sothink SWF Decompiler for Mac (txt)
- Sothink SWF Decompiler for Mac supports Flash CS3 (9.0) and ActionScript 3.0 completely. It can convert SWF to FLA and extract elements from SWF into variable formats, such as shapes, , images, videos, frames, fonts, texts, buttons, sprites and ActionScripts. It is compatible with Flash versions including Flash 9. Support...
- Software downloads 2008-07-24
Neighboring Terms
Premier Vendor Content Whitepapers, webcasts & resources from our Power Center Sponsors

- Visit the all new ZDNet Enterprise Mobility Hub sponsored by Verizon Wireless. It has the latest news, commentary, and resources for your mobile strategy development.
- Read the latest from Matthew Miller's The Mobile Gadgeteer Blog
- Five steps to protect mobile devices anywhere, anytime
- Watch a video about Distributed Antenna Systems (DAS)
- Learn how you can fetch your email from anywhere
- All this and more on the ZDNet Enterprise Mobility Hub






