I was testing the below code from the fpc documentation and I get the "Can't
take the address of constant expressions" error, with the cursor positioned
just after "(S)" in the 2nd WriteLn statement.

I do not understand how to fix this.  I did search for the error, but it
none of it makes sense.
I'll solve my issue another way, but I'm wondering if this example should be
fixed.

0.9.31-30142, 2.4.2, win32-Vista

Any suggestions?


source:
http://www.freepascal.org/docs-html/rtl/sysutils/ansiextractquotedstr.html

Program Example51;
{ This program demonstrates the AnsiQuotedStr function }
Uses sysutils;

Var S : AnsiString;

Begin
 S:='He said "Hello" and walked on';
 S:=AnsiQuotedStr(Pchar(S),'"');
 Writeln (S);
 Writeln(AnsiExtractQuotedStr(Pchar(S),'"'));
End.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to