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

Dmitry Boyarintsev skalogryz.lists at gmail.com
Thu Jul 10 14:55:59 CEST 2014


On Thu, Jul 10, 2014 at 3:28 AM, Jonas Maebe <jonas.maebe at elis.ugent.be>
wrote:

>
> 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).
>
> Sigh... Making a language target dependent (0-based for "mobile" and
1-based for "desktop") contradicts the concept of high-level language.
http://en.wikipedia.org/wiki/High_level_language
"In computer science, a high-level programming language is a programming
language with strong abstraction from the details of the computer.".

It goes as stupid as this: If my computer fits into a palm and/or looks
fancy, it's 0-based, otherwise it's 1-based string.

To make things worse, it actually has nothing to do with a target
computer... but with the language marketing
What was the term for it? "High level trend language"?

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140710/cc769634/attachment.html>


More information about the fpc-pascal mailing list