Created
September 18, 2013 14:05
-
-
Save jpluimers/6609618 to your computer and use it in GitHub Desktop.
ZEROBASEDSTRINGS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure ZeroBasedTest; | |
const | |
S: string = '012'; | |
begin | |
{$ZEROBASEDSTRINGS OFF} | |
Writeln(S[1]); // shows "0" | |
Writeln(S.Chars[1]); // shows "1" | |
{$ZEROBASEDSTRINGS ON} | |
Writeln(S[1]); // shows "1" | |
Writeln(S.Chars[1]); // shows "1" | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment