Remix.run Logo
pjmlp 2 hours ago

Delphi has allowed this for quite some time.

vintagedave 41 minutes ago | parent [-]

Yes - OP, you can do this via inline vars and consts:

  begin
    var foo : string := 'hello';
    const c : integer = 5;
    var bar := GetBar(); // type inference even
    
    // and in blocks:
    for var i := low(x) to high(x) do...
  end;