Sign in Join

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

Mailing lists / fpc-pascal / 2016-04

TStringHelper with SysUtils functions

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

silvioprog

Hello,

How do I use the TStringHelper with SysUtils functions?

When I've tried to compile this code:

=== code ===

program Project1;
{$mode objfpc}{$H+}
uses
  SysUtils;
begin
  WriteLn(ExtractFileExt(ParamStr(0)).Substring(1));
  ReadLn;
end.

=== /code ===

I've got:

project1.lpr(9,39) Error: Illegal qualifier

A possible fix would be changing the TStringHelper declaration from "TStringHelper = Type Helper for AnsiString" to "TStringHelper = Type Helper for string" keeping it Delphi compatible.

Thank you!

Silvio Clécio

Reply by email