0

In the Delphi IDE the String type is highlighted as a keyword, similar to syntax elements like const, function, begin, end, or class. It seems to be the only type that gets this special highlighting, other types like Integer, Boolean, or Double have a "normal" color. Also there is no special color for other types similar to String like AnsiString, WideString or UnicodeString.

Out of curiosity: What is the reason the String type is treated special in IDE syntax highlighting?

blerontin
  • 2,892
  • 5
  • 34
  • 60
  • The reason is that `String` is considered a reserved word and thus gets keyword highlighting. This is different from other types like `Integer` which are not considered a reserved word. For example you can create a variable named "Integer", but you cannot create a variable named "String". – blerontin Jun 13 '23 at 08:52
  • The reason is you haven't searched existing questions and answers. You can redefine `type Integer= String` but you cannot redefine `type String= Integer`. – AmigoJack Jun 13 '23 at 10:41
  • @AmigoJack: No problem with closing this as a duplicate question. Just wanted to summarize the information from the linked answer. – blerontin Jun 13 '23 at 11:30

0 Answers0