I'm using Delphi Berlin 10.1.2, I just started a new project using the superobject library: link
This library serves to interpret API responses
function FloatToJson(const value: Double): SOString;
var
p: PSOChar;
begin
Result := FloatToStr(value);
if {$if defined(NEED_FORMATSETTINGS)}FormatSettings.{$ifend}DecimalSeparator <> '.' then //Error aqui
begin
p := PSOChar(Result);
while p^ <> #0 do
if p^ <> SOChar({$if defined(NEED_FORMATSETTINGS)}FormatSettings.{$ifend}DecimalSeparator) then //Error aqui
inc(p) else
begin
p^ := '.';
Exit;
end;
end;
end;
And in this other function:
function CurrToJson(const value: Currency): SOString;
var
p: PSOChar;
begin
Result := CurrToStr(value);
if {$if defined(NEED_FORMATSETTINGS)}FormatSettings.{$ifend}DecimalSeparator <> '.' then //Error aqui
begin
p := PSOChar(Result);
while p^ <> #0 do
if p^ <> SOChar({$if defined(NEED_FORMATSETTINGS)}FormatSettings.{$ifend}DecimalSeparator) then //Error aqui
inc(p) else
begin
p^ := '.';
Exit;
end;
end;
end;
The error is:
Undeclared identifier: 'DecimalSeparator'
Why does this happen?