Have an amazing solution built in RAD Studio? Let us know. 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
CodeDelphiRAD Studio

Easily Automate The DigitalOcean API From Windows And Mobile

C++Code

2021 Annual C++ Developer Survey "Lite" by ISOCpp.org - Results summary

C++

High-Performance C++ NMEA Parser GPS Interface

News

Using a Common C++ Library with C++Builder and TwineCompile

Leave a Reply

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

IN THE ARTICLES