3 ms·
Does this support declaring variables anywhere (as opposed to only in the beginning of a function)? That was my primary complaint when using Lazarus.
by HexDecOctBin 5mo ago
Does this support declaring variables anywhere (as opposed to only in the beginning of a function)? That was my primary complaint when using Lazarus.
- pjmlp 5mo agoDelphi has allowed this for quite some time.
- vintagedave 5mo agoYes - 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;
- HexDecOctBin 5mo agoYeah, but then I'll have to deal with Embarcadero.