t-edson/P65Pas

init variables from an unit

mvdhoning opened this issue · 1 comments

i have a unit called LibScreen where i define a list of colors like so

var
  Black      : byte = 0;
  White     : byte = 1;
//etc

but that gives a compile error: Cannot initialize absolutie variable "Black" in this location when compiling the main application

using a const and not specifying the type gives an application that crashes at runtime.

so what is a neat way to keep declarations like these in a unit and not in the main application

thanks for your answer in advance

nevermind using const works fine with version 0.7.3 (it did not with 0.7.1)