Skip to main content Accessibility help
×
Hostname: page-component-7479d7b7d-c9gpj Total loading time: 0 Render date: 2024-07-13T02:28:28.687Z Has data issue: false hasContentIssue false

2 - Variables and Constants – A Place for Everything and Everything in Its Place

Published online by Cambridge University Press:  05 June 2012

Jim McKeown
Affiliation:
Dakota State University
Get access

Summary

VB Quip

There are 10 types of people in the world: those that understand binary and those that don't.

On a computer, memory is everything, or nearly so. Data are stored there and programs are loaded and run from memory. Memory is essential. Compared to what was available a few years ago, today's computers have a huge amount of memory. A few years ago that same comparison would have been true as well. Forty years ago we sent men to the moon with spaceships that had less memory than a good pocket calculator has today. All computers, old and new, have memory in common. Memory is where what the computer “knows” is stored. Much of programming comes down to allocating and managing memory. For the PCs of a generation ago, memory was a scarce and expensive commodity to be guarded closely and used judiciously. Programmers used it carefully and squeezed as much as they could from it. At the time, conserving memory gave you a leg up on development and helped make your programs faster and more efficient. And, today, while the amount of memory isn't as much of an issue, the management of memory is. When you work on your computer, you work with its “desktop.” These days, it's the size of a table. In the early days of programming, that “desktop” was the size of a postage stamp. Variables and constants are two important components of a computer program. Both are created in memory and are assigned values.

Type
Chapter
Information
Programming in Visual Basic 2010
The Very Beginner's Guide
, pp. 36 - 67
Publisher: Cambridge University Press
Print publication year: 2010

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×