[Lazarus] [again] Can't take the address of constant expressions
John Repucci
john.repucci at gmail.com
Fri Jun 10 04:31:52 CEST 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110609/af939b83/attachment-0002.html>
More information about the Lazarus
mailing list