Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-09

Overloaded Pos bug

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

In fpc revision 11746 i cannot compile this construction:

program posx;
var
  s, s1: WideString;
begin
  Pos(s[1], s1);
end.

fpc -vh posx.pas
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.3.1 [2008/09/11] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
posx.pas(5,3) Error: Can't determine which overloaded function to call ustrings.inc(1524,10) Hint: Found declaration: Pos(UnicodeChar,const UnicodeString):LongInt ustrings.inc(1497,10) Hint: Found declaration: Pos(const UnicodeString,const UnicodeString):LongInt posx.pas(7) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

Kylix and about month erlier fpc was ok.

Petr

Ing. Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email

Vincent Snijders
to Unknown author
Show quoted text 22 lines
In fpc revision 11746 i cannot compile this construction: program posx; var s, s1: WideString; begin Pos(s[1], s1); end. fpc -vh posx.pas Hint: Start of reading config file /etc/fpc.cfg Hint: End of reading config file /etc/fpc.cfg Free Pascal Compiler version 2.3.1 [2008/09/11] for i386 Copyright (c) 1993-2008 by Florian Klaempfl posx.pas(5,3) Error: Can't determine which overloaded function to call ustrings.inc(1524,10) Hint: Found declaration: Pos(UnicodeChar,const UnicodeString):LongInt ustrings.inc(1497,10) Hint: Found declaration: Pos(const UnicodeString,const UnicodeString):LongInt posx.pas(7) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Kylix and about month erlier fpc was ok.

Please, create a bug report.

Vincent

Reply by email