Previous Category Entry
Left Arrow
Compnents
Current Category Entry
Next Category Entry
Control
Right Arrow
String
SubCategory Entry Date: March 18,2024 @ 08:18:22 / Last Updated On: March 19,2024 @ 04:28:34
The String data type holds sequences of characters, such as sentences.
The string is treated as an AnsiString by default. However, it can be treated as a ShortString if the $LongStrings compiler directive is set Off (the default is On).

An AnsiChar can hold any number of characters, restricted only by memory.

Version 2, however, forces the string to be a ShortString by defining a FixedSize (up to 255 characters). This is particularly important when creating many strings and especially so when storing strings in records (as in example 2).

Strings can be assigned from other strings, from functions that return a string, and with concatenations as in the sample code.

(Information taken from delphibasics.co.uk« and has been edited)
  1. Code Articles
  2. Delphi - Create Global Variables that can be used throughout our code.
    Delphi - Create Global Variables that can be used throughout our code.