local var init does not work any more

Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

local var init does not work any more

 · 
Posted: 25.05.2019 - 00:22  ·  #1
Hello Rolf,

In a 3 years old project this could be compiled without problems:
Code
function GetMux: byte;
var
  MuxPort: byte = 0; // new compiler shows here error: unexpected "=" found
begin
  ...
end;


I want to update that project to latest compiler and now I have to do it like this:
Code
function GetMux: byte;
var
  MuxPort: byte;
begin
  MuxPort := 0;
  ...
end;


Is this intentional behavior?
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: local var init does not work any more

 · 
Posted: 10.06.2019 - 22:25  ·  #2
Hello Avra,
I had some heavy problems with this so i must remove this feature. Sorry.

rolf
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: local var init does not work any more

 · 
Posted: 11.06.2019 - 09:13  ·  #3
Ok, that's not much of an issue anyway.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   58   72 · Page-Gen-Time: 0.019433s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI