Difference between revisions of "String"

From Lazarus wiki
Jump to navigationJump to search
(shortstring is UCSD/TP not standard pascal.)
Line 5: Line 5:
 
[[Compiler]] switch {$H} is usually on {$H+} then String is  AnsiString type.
 
[[Compiler]] switch {$H} is usually on {$H+} then String is  AnsiString type.
  
The ShortString length is decided by the programmer and should be, in [[Standard Pascal]],from 1 to 255 characters.  
+
The ShortString length is decided by the programmer and should be, in [[UCSD Pascal]],from 1 to 255 characters.  
 
The length of an AnsiString is only limited by available memory.
 
The length of an AnsiString is only limited by available memory.
 +
 +
In the future, there might be a switch too to switch it to unicode (UTF-8 or UTF-16 depending on platform.
  
 
{{Data types}}
 
{{Data types}}
  
 
[[category:Pascal]]
 
[[category:Pascal]]

Revision as of 11:38, 31 March 2009

Deutsch (de) English (en) español (es) français (fr) русский (ru)

Type which may contain phrases. String is ShortString or AnsiString type.

Compiler switch {$H} is usually on {$H+} then String is AnsiString type.

The ShortString length is decided by the programmer and should be, in UCSD Pascal,from 1 to 255 characters. The length of an AnsiString is only limited by available memory.

In the future, there might be a switch too to switch it to unicode (UTF-8 or UTF-16 depending on platform.


navigation bar: data types
simple data types

boolean byte cardinal char currency double dword extended int8 int16 int32 int64 integer longint real shortint single smallint pointer qword word

complex data types

array class object record set string shortstring