Did you know: Initializing global variables?

Maybe not everyone knows that the global variables can be initialized the same way as the typed constants.

Please note that the global variables are EVIL if abused.

So if you have the variable in a global scope (unit) then you can initialize it using following construction:

var
  X: String = 'Your initial value';

This does not work for locally defined variables!

Leave a Reply