[fpc-devel]FYI: array constructor & string

Johannes Berg johannes at sipsolutions.de
Wed Nov 26 14:45:00 CET 2003


Hi,

I couldn't compile anything with the following:

procedure x(const a:array of const);
var s:string; // ansistring or shortstring doesn't matter
x([s]);

and tracked it down to the second change block of:
http://www.freepascal.org/cgi-bin/viewcvs.cgi/fpc/compiler/nld.pas.diff?r1=1.116&r2=1.117

I put in
  stringdef :
     hp.left:=ctypeconvnode.create(hp.left,cansistringtype);

I doubt that this is the correct fix, it does however (properly?)
compile above example after this change (with both shortstring and
ansistring).

johannes
-- 
http://www.sipsolutions.de/
GnuPG key: http://www.sipsolutions.de/keys/JohannesBerg.asc
  Key-ID: 9AB78CA5 Johannes Berg <johannes at sipsolutions.de>
  Fingerprint = AD02 0176 4E29 C137 1DF6 08D2 FC44 CF86 9AB7 8CA5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20031126/20b424b8/attachment.sig>


More information about the fpc-devel mailing list