[fpc-pascal] FPC + Mobile development: the String type

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Jul 10 09:28:46 CEST 2014


On 10 Jul 2014, at 07:24, Graeme Geldenhuys wrote:

> There is a discussion in the tiOPF newsgroups about adding Mobile
> development support to the framework. A Delphi developer raised the
> following issue with first experimentation.
> 
> Is this issue the same for FPC? ie: is the String type zero based for
> mobile development?

In FPC, this setting only depends on the {$zerobasedstrings on/off} directive (supported in FPC 2.7.1+). The default is "off" everywhere. You can also switch it off in Delphi for mobile targets: http://docwiki.embarcadero.com/RADStudio/XE4/en/Zero-based_strings_(Delphi)

They probably changed the default there for efficiency reasons (not having to subtract 1 from string indices all the time).


Jonas


More information about the fpc-pascal mailing list