Am 21.08.2017 13:51 schrieb "Sven Barth" <pascaldra...@googlemail.com>: > > Am 21.08.2017 08:23 schrieb "Michael Van Canneyt" <mich...@freepascal.org >: > > > > > > > > On Mon, 21 Aug 2017, Ryan Joseph wrote: > > > >> I’m trying to split a string by a delimiter and see there is a type helper called TStringHelper ( https://www.freepascal.org/docs-html/rtl/sysutils/tstringhelper.html). The compiler version I’m using is "Free Pascal Compiler version 3.1.1 [2017/04/22] for i386” but when I include SysUtils the methods are not found. > >> > >> For example: > >> > >> var > >> str: string; > >> parts: TStringArray; > >> > >> parts := str.Split(' ‘); > >> > >> > >> What am I doing wrong? > > > > > > Try > > > > var > > Str : AnsiString; > > or > > Str : WideString; > > > > I believe the compiler has some trouble finding the helper if you use the > > 'string' alias. I think there is even a bugreport about it. > > Sven Barth can confirm/deny this. > > I thought that was fixed? Except of course if $H- is used (which is the default in all modes except the Delphi ones) cause then String = AnsiString.
String = ShortString in case of $H- of course -.- Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal