Jump to content

A book about Object Pascal Style Guide

Recommended Posts

43 minutes ago, wuwuxin said:

Thank you for the link.  On one hand, string is listed as a reserved work, on the other hand, it also says "System.String" is an alias for "UnicodeString".......... 

Being reserved word only means that you cannot use those words as identifiers. It does not tell you anything what each reserved word represents in the language.


If you are asking about coding style and why is string written in small caps, then being reserved word has a meaning in that context because there is a coding style rule (which you don't have to follow, of course) that says reserved words are written in small caps. 


When you are talking about string being an alias for UnicodeString then this describes its semantic - its behavior and what it represents. "string" describes default string type and its definition can change in different compilers. 

For instance, in Delphi 1 string was alias to ShortString, and in Delphi 2 - Delphi 2007 it was alias for AnsiString, and since Delphi 2009 string is alias for UnicodeString. 

  • Thanks 1

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now