Saturday, November 2, 2013

Delphi for Android uses 0-based strings

Delphi handles strings differently when compiling for Windows and Android.

Windows has 1-based strings, i.e. the first character in a string is s[1].

Android has 0-based strings, i.e. the first character in a string is s[0].

Also, you should expect, that future versions of Delphi will not allow you to write this code:

s[1]:='a';

1 comment: