Re: [fpc-devel] Just to confirm, "with" behaviour expected

2023-08-14 Thread Martin Frb via fpc-devel
On 14/08/2023 14:52, Michael Van Canneyt via fpc-devel wrote: On Mon, 14 Aug 2023, Martin Frb via fpc-devel wrote: Does "with" take the "address" of the value, and operate on that address, even if the address of that value could change within the "with" statement. You may not do this. It

Re: [fpc-devel] Just to confirm, "with" behaviour expected

2023-08-14 Thread Michael Van Canneyt via fpc-devel
On Mon, 14 Aug 2023, Martin Frb via fpc-devel wrote: In the below code, the array is resized (and more important relocated in mem) inside the function "bar". The commented line (without "with") works as expected. The "with" line has a different behaviour. I guess it is by design. Just

[fpc-devel] Just to confirm, "with" behaviour expected

2023-08-14 Thread Martin Frb via fpc-devel
In the below code, the array is resized (and more important relocated in mem) inside the function "bar". The commented line (without "with") works as expected. The "with" line has a different behaviour. I guess it is by design. Just wanted to confirm. The version with "with" prints 12345