On 1/12/23 10:29 AM, Mattias Gaertner via fpc-devel wrote:
On Wed, 11 Jan 2023 23:58:34 +0100
Bart via fpc-devel <fpc-devel@lists.freepascal.org> wrote:
[...]
begin
with WideStringManager do
begin
writeln(1);
Wide2AnsiMoveProc(pwidechar(WSource),RawByteString(ADest),
CP_UTF8, Length(WSource));
writeln(2);
Ansi2WideMoveProc(PChar(ASource), CP_UTF8, UDest,
Length(ASource)); //<< test.lpr(24,53) Error: Can't take the address
of constant expressions (caret behind UDest)
end.
First of all, adding a 'end;" for the "with" compiles under Linux.
That's because widestring=unicodestring on Linux.
i'm a little surprised there is no "mismatched begin/end" error with the caret
pointing to the 2nd begin...
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list where it belongs!*
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel