- Delphi
- String
- Delphi - Create Global Variables that can be used throughout our code.
Delphi - Create Global Variables that can be used throughout our code.
Article Entry Date: March 19,2024 @ 04:41:47 / Last Updated On: March 19,2024 @ 04:42:22
In Delphi, we can create Global Variables that can be used throughout our code.
The Global Variable makes it easy to reference the Variable at any time in our code without having to rewrite it every time.
Here, we will create 1 Variable.
(Notice the Var is located in the head of our code, right below the implementation.)
Not everything can be made into a Global Variable. You will have to try and see what will work.
Now, we will use them.
You can always change the 'List.txt' into a TEdit that you have on your form with the Filename or leave it hardcoded.