RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!
C++

#CodingResolutions: Programming Fundamentals – Variables and Variable Scope

Author: Rebekah D

So far in the #CodingResolutions series, we’ve worked a lot in the visual design framework to demonstrate how easy it is to create low-code apps. It’s instant gratification to see our apps come to life!  However, there’s a lot more to programming so let’s get down to work. 

In this post, let’s look at some programming fundamentals and explore variables and what variable scope means in Delphi and C++. 

C++ Variables and Variable Scope

Do you understand the difference between block, function, namespace and class scope for C++ variables? Depending on where you declare your variables, you may be able to access them from only a small portion of your program or from the entire program. There are performance trade-offs when you create global variables that are rarely needed, so make sure you’re using the right kind. 

Watch this video for an introduction to variables and variable scope: https://embt.co/CPPScope

For additional reading on C++ variables, head over to this article

Delphi Variables and Variable Scope

Learn how Delphi programs use and store data with variables, how to declare variables, and data types: https://embt.co/DelphiDataTypes.

For experienced developers, you can now use inline variables in Delphi 10.3 Rio: https://embt.co/InlineVariables

Previous #CodingResolution posts: 


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts
C++Delphi

Get Free Responsive Cross-Platform Login Screen Templates For Android And iOS

C++CodeDelphi

Learn To Build A Python GUI For Working With The Numpy Library In A Delphi Windows App

C++Code

Learn About Using Right Angle Brackets In This C++11 Feature For Windows Development

C++DelphiRAD Studio

Learn How To Use WinRT In Your Native Windows Delphi And C++ Builder Apps

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES