Book contents
- Frontmatter
- Contents
- Preface
- 1 Fundamentals of Design and Programming – Starting from Scratch
- 2 Variables and Constants – A Place for Everything and Everything in Its Place
- 3 Writing Programs – First You Walk, Then You Run
- 4 Writing Programs II – More Controls and New Logic
- 5 Using If and Case – Decisions, Decisions, Decisions
- 6 Loops – Once Is Not Enough
- 7 Procedures and Functions – Divide and Conquer
- 8 Writing Programs III – Tying It All Together, So Far
- 9 File I/O – Files and Records and Fields, Oh My!
- 10 Arrays and Structures – Organizing Data
- 11 Events and More Controls – Tips and Tricks for Programming
- 12 Objects and Classes – Objects Are in a Class By Themselves
- 13 Graphics – The Visual (and Audio) Side of Visual Basic
- 14 LINQ to SQL – The World Runs on Databases
- 15 Crystal Reports – Tying Databases to Output
- Appendices
- Index
2 - Variables and Constants – A Place for Everything and Everything in Its Place
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- 1 Fundamentals of Design and Programming – Starting from Scratch
- 2 Variables and Constants – A Place for Everything and Everything in Its Place
- 3 Writing Programs – First You Walk, Then You Run
- 4 Writing Programs II – More Controls and New Logic
- 5 Using If and Case – Decisions, Decisions, Decisions
- 6 Loops – Once Is Not Enough
- 7 Procedures and Functions – Divide and Conquer
- 8 Writing Programs III – Tying It All Together, So Far
- 9 File I/O – Files and Records and Fields, Oh My!
- 10 Arrays and Structures – Organizing Data
- 11 Events and More Controls – Tips and Tricks for Programming
- 12 Objects and Classes – Objects Are in a Class By Themselves
- 13 Graphics – The Visual (and Audio) Side of Visual Basic
- 14 LINQ to SQL – The World Runs on Databases
- 15 Crystal Reports – Tying Databases to Output
- Appendices
- Index
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 2010The Very Beginner's Guide, pp. 36 - 67Publisher: Cambridge University PressPrint publication year: 2010