Hi Michael,

On 4/4/23 09:05, Michael Van Canneyt wrote:

[cut]

Do I have any other option besides changing from "var" to "const" everywhere, and provide initial values in all declarations ?

Make them actually global variables.

procedure X;

Var
  y : integer;

begin
// Use y
end;

becomes

var x__y : integer;

procedure x;

begin
   // use x__y end;

I did this operation manually for some programs that I had to update.
Maybe perl can help.


Ok, makes sense. I'll see if putting them in "const" sections makes more sense, otherwise I guess this is the route I'll have to take.

Regards,
Jacob
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to