Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Sven Barth via fpc-devel
Am 13.01.2023 um 01:05 schrieb Bart via fpc-devel: The issue is indeed the conversion from UnicodeString to WideString which is not allowed for a var/out parameter. That the compiler doesn't use the error “Call by var for arg no. 3 has to match exactly: Got "UnicodeString" expected "WideString"”

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Bart via fpc-devel
> The issue is indeed the conversion from UnicodeString to WideString > which is not allowed for a var/out parameter. That the compiler doesn't > use the error “Call by var for arg no. 3 has to match exactly: Got > "UnicodeString" expected "WideString"” is due to Ansi2WideMoveProc() > being a

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Sven Barth via fpc-devel
Am 11.01.2023 um 23:58 schrieb Bart via fpc-devel: Given the following program (an excerpt form a test program for a bugreport about the fpwidestring unit): === program test; {$codepage utf8} {$mode objfpc} {$h+} uses FpWideString; var WSource: WideString = 'source'; USource:

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Mattias Gaertner via fpc-devel
On Wed, 11 Jan 2023 23:58:34 +0100 Bart via fpc-devel wrote: > Given the following program (an excerpt form a test program for a > bugreport about the fpwidestring unit): > > === > program test; > {$codepage utf8} > {$mode objfpc} > {$h+} > > uses > FpWideString; > > var > WSource:

Re: [fpc-devel] Why: "Can't take the address of constant expressions" here?

2023-01-12 Thread Michael Van Canneyt via fpc-devel
On Wed, 11 Jan 2023, Bart via fpc-devel wrote: Given the following program (an excerpt form a test program for a bugreport about the fpwidestring unit): === program test; {$codepage utf8} {$mode objfpc} {$h+} uses FpWideString; var WSource: WideString = 'source'; USource: UnicodeString