If {$LONGSTRINGS ON} is specified, the keyword String (no length specifier) will be treated as AnsiString, and the compiler will treat the corresponding variable as an ansistring, and will generate corresponding code. This switch corresponds to the -Sh command line option.
By default, the use of ansistrings is off, corresponding to {$H-}. The system unit is compiled without ansistrings, all its functions accept shortstring arguments. The same is true for all RTL units, except the sysutils unit, which is compiled with ansistrings.
However, the {$MODE} statement influences the default value of {$H}: a {$MODE DELPHI} directive implies a {$H+} statement, all other modes switch it off. As a result, you should always put {$H+} after a mode directive. This behaviour has changed, in older Free Pascal versions this was not so.